when a image is uploaded , image is not getting refreshed. i tried giving Img.ImageUrl = Server.MapPath(imagepath+"?i=" +system.guid.newguid().Tostring() ) gives virtual path error.

when a new image is uploaded with the same name , image is not getting refreshed. still old image is shown.
in code behind file i gave following:

imgGraph.src = Server.MapPath(imagepath+"?i=" & system.guid.newguid().Tostring());
throws run time error.

Who is Participating?
krish1682Connect With a Mentor Author Commented:
the above 2 are not working for me. I removed server.mappath and its working fine.
try somthing
imgGraph.src = Server.MapPath(imagepath + "/" +ImageName );
Anurag ThakurTechnical ManagerCommented:
try this
imgGraph.src = Server.MapPath(imagepath) +"?i=" & system.guid.newguid().Tostring();
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.