Microsoft KB Archive/190767

= BUG: File May Change When Saving to a Web Project =

Article ID: 190767

Article Last Modified on 8/11/2005

-

APPLIES TO


 * Microsoft Visual Studio 6.0 Enterprise Edition

-



This article was previously published under Q190767



SYMPTOMS
When an HTML or Active Server Pages (ASP) file in a Web project is saved (from any editor), or when an HTML or ASP file is moved, copied, or added to a folder in a Web project, the content of the file may be changed without warning.

When a file that has been changed in this manner is saved from the Visual InterDev editor, no indication is given to the user that the file has been changed. The save appears to be successful, and the file-dirty indicator (*) in the title bar of the document disappears. But, the document in the editor differs from the file on disk.



CAUSE
This happens when the "Link Repair" option of a Web project is enabled. This issue is a limitation of the manner in which Link Repair is implemented.



RESOLUTION
Disable the "Link Repair" option of the Web project. This option is shown on the General tab of the Web project's Properties page. You can get to the Web project's Properties page by right-clicking on the name of the project in the Project Explorer window, and selecting Properties.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



MORE INFORMATION
Link Repair is enabled by default in newly created Web projects.

This issue is known to cause the following changes:   Most attribute values of HTML tags will be enclosed in double quotes, for example: becomes   Special characters such as spaces in URL references will be replaced with their hex-value escape sequence, for example:  becomes    HEIGHT and WIDTH attributes will be added to tags that reference valid image files (the dimensions are derived from the image itself), for example:  becomes  </li> HTML comments that span more than one line may be concatenated into a single line (occurs when file is moved, copied or added to a folder in a project, but not when it is saved from the editor)</li>  An empty string assigned to the value attribute of an tag may be removed, for example: becomes </li> Attribute values of HTML tags that contain double-byte character set (DBCS) information may become corrupted in localized versions of Microsoft Visual InterDev.</li></ul>

Steps to Reproduce Behavior
<ol> Create a new Web project.</li> Add a valid image file to the Images folder in the project.</li> Add a new HTML page to the project and open it for editing.</li>  In Source view, type a simple tag that refers to the image, for example: <img src=images/myPic.gif> </li> Save the page.</li> Close the page, and reopen it.</li></ol>

You'll notice that the tag has been changed.

<div class="references_section">