Asp.net Image Control Not Refresh with same name problem

Solve Asp.net Image control which is not refresh with the same name

I got This Article From http://forums.asp.net/t/1176582.aspx

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.

Advertisement

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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