SharePoint Designer Adds Blank Rows

Sometimes I have seen SharePoint Designer add lots of blank rows when you save an .aspx file. In trying to discern how this happens, I noticed a pattern and when I made a change the program no longer added lots of blank rows in the code.

The behavior appears to happen when you have text, such as an attribute, which is not surrounded on either side by at least an open or close tag.

Without showing code, just look for a value like a javascript: or an option in a data view which is not surrounded by tags and thus is considered plain text (black) in code view, and for some reason the automatic formatting engine starts placing way too many blank lines in there (I have seen tens of thousands).

Comments

  1. Thank you for your post! You led me in the right direction to resolving this issue. You are correct: the solution is to decorate the literal-text with the HTML script (or style) tags (more often than not these opening and closing tags are missing). However it is crucial that the opening HTML tag be on the same line as the "SharePoint:...block" tag. If you put it on it's own line the problem will persist.

    The solution is to decorate the literal-text with the HTML Script (or Style) tags. (More often than not these opening and closing tags are missing) It is crucial that the opening HTML tag is on the same line as the "SharePoint:...block" tag. If you put it on it's own line the problem will persist. The above text changes are necessary for every "SharePoint:...block" tag on the page.

    Exact instruction and repeatable demonstration of the issue can be found here...
    http://strangecodestuff.blogspot.com/2015/02/solved-sharepoint-designer-inserting.html

    ReplyDelete

Post a Comment

Popular posts from this blog

SharePoint Designer 2013 Approval Workflow with Comments

Change SharePoint server hostname and Web Application Names

The Timer Service Failed to Recycle