If you alter an image file that is used in a Microsoft
Visual Studio .NET project, an older version of the image may be displayed in
the design environment. If a WebForm contains an image, and that image has been
deleted from the project and then altered and re-added to it, the WebForm may
still display the original image in Design view of the WebForm. Additionally,
if you create a new WebForm and drag the new image into the Web Forms Designer,
the old image may still be displayed.
↑ Back to the top
This behavior can occur because the integrated development
environment (IDE) uses the Temporary Internet files folder to cache the view of
the Web page. Unless these files are updated, cleared, or the IDE is refreshed,
the IDE displays the view from the cached file.
↑ Back to the top
To work around this issue, use any of the following
methods:
- On the View menu in the IDE, click Refresh.
-or- - Browse to the Web page in question, and then reload the
page.
-or- - Delete the contents of your Temporary Internet files folder
in Internet Explorer, and then reload the page.
↑ Back to the top
Microsoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
↑ Back to the top
Steps to Reproduce the Problem
- Create a new ASP.NET Web application project in Visual
Studio .NET.
- Add a Graphics Interchange Format (GIF) file to the
project.
- Add a WebForm to the project, and then drag the GIF file
into the Web Forms Designer.
- Build the project, and then browse to the Web page in
question.
- Close the WebForm, and delete the GIF file from the
project.
- Edit the original copy of the GIF file so that it looks
different, and then add it to the project again.
- Double-click the WebForm to view the design.
The
old version of the image is still displayed. - Create a new WebForm.
- Drag the image into the Web Forms Designer. The original
image is still displayed.
↑ Back to the top