kwizcom banner advertisement

SharePoint Designer "Error Reading File" - Bulk Blank Lines Fix

Getting "Error Reading File" when trying to open a page in SharePoint Designer? Well, its a bug! SharePoint designer inserts Blank lines in the aspx file when you edit!!

Fix:
Open the page as text in SPD (or any other Text editor), Remove Blank Lines (Careful! Don't delete the code. Delete only blank lines). You can select few blank rows, and use Find & Replace!
Error Reading File
Here is the screenshot:
sharepoint designer inserting blank lines

Find the blank lines SharePoint designer adds, Remove Empty rows from the file.
sharepoint designer adding blank lines

There is a utility in codeplex: http://sharepointfilerepair.codeplex.com/
SharePoint Designer "Error Reading File" - Bulk Blank Lines Fix SharePoint Designer "Error Reading File" -  Bulk Blank Lines Fix Reviewed by Salaudeen Rajack on October 11, 2012 Rating: 5

1 comment:

  1. A detailed explanation of the cause of the issue can be found here:
    http://strangecodestuff.blogspot.com/2015/02/solved-sharepoint-designer-inserting.html


    Basically - SharePoint Designer is inserting blank lines. This behavior occurs around lines of literal-text within tag-blocks. In Designer every "SharePoint:ScriptBlock" and "SharePoint:StyleBlock" tag will experience this issue.

    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.

    Now the issue is fixed. Save as many times as you want - no more blank lines are inserted.

    ReplyDelete

Please Login and comment to get your questions answered!

Powered by Blogger.