BUG: File May Change When Saving to a Web Project

ID: Q190767


The information in this article applies to:
  • Microsoft Visual Studio 6.0


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:
    
          <p align=center> becomes <p align="center"> 


  • Special characters such as spaces in URL references will be replaced with their hex-value escape sequence, for example:
    
          <a href="My File.htm"> becomes <a href="My%20File.htm"> 


  • HEIGHT and WIDTH attributes will be added to <img> tags that reference valid image files (the dimensions are derived from the image itself), for example:
    
          <img src=Pic.gif> becomes <img src="Pic.gif" HEIGHT=20
           WIDTH=20> 


  • 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)


  • An empty string assigned to the value attribute of an <option> tag may be removed, for example:
    
          <option value=""> becomes <option value> 


Steps to Reproduce Behavior

  1. Create a new Web project.


  2. Add a valid image file to the Images folder in the project.


  3. Add a new HTML page to the project and open it for editing.


  4. In Source view, type a simple <img> tag that refers to the image, for example:
    
          <img src=images/myPic.gif> 


  5. Save the page.


  6. Close the page, and reopen it.


You'll notice that the <img> tag has been changed.


REFERENCES

More information may be found in the documentation for Front Page Extensions.

Additional query words:

Keywords : kbExtension kbFrontPage kbide kbServer kbVisID600bug kbVS600bug kbGrpASP
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: July 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.