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.

Posted on 2008-11-18
Last Modified: 2013-12-08
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.

Question by:krish1682
    LVL 13

    Expert Comment

    try somthing
    imgGraph.src = Server.MapPath(imagepath + "/" +ImageName );
    LVL 26

    Expert Comment

    by:Anurag Thakur
    try this
    imgGraph.src = Server.MapPath(imagepath) +"?i=" & system.guid.newguid().Tostring();

    Accepted Solution

    the above 2 are not working for me. I removed server.mappath and its working fine.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
    Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now