Image Control Not Refresh with same name problem

Solve Image control which is not refresh with the same name

I got This Article From

To Refresh Or We can see Display Image in Asp.Net Image Control with Same name that create a problem
To solve above problem we can attach  unique code with image name

printImage.ImageUrl = “~\\sessions\\sd_” + Session.SessionID + \\printMAD.bmp + “?” + RandomNumber.ToString();

Where RandomNumber is some randomly generated number, or you could also replace RandomNumber.ToString() with System.Guid.NewGuid().ToString() which is also unique.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s