Source: http://www.study-code.com/dotnet/aspnet/67496.htm
Use the image control in Asp.net. When you want to dynamically change the image content, you can directly use the imageurl attribute to point to the new image path (eg: image. imageurl = ImagePath ). However, when you update the original image content rather than directly changing the image path, the image will not be updated even if you re-Execute image1.imageurl = ImagePath. In addition, you cannot refresh the image. The image is still the original one.
I don't know why. Net does not change when determining the imageurl attribute because the two paths are the same before and after, and the forced dispose is invalid. The original solution is very simple. You only need to add a random parameter after the image path to make the server think the image has changed. Eg: image. imageurl = ImagePath + "? Temp = "+ datetime. Now. tostring () This example uses the current time as a random number. The trouble for one afternoon is solved only in the middle of the bullet.