tags:

views:

22

answers:

1

i want to refer an image c:/image/ff.gif/ . how can i do that. i tried with img src but couldn't make it to work. any idea ?

+2  A: 

The image needs to be part of the site if you want to use it directly. If it is situated outside of your site root you could write an action that will fetch the image and serve it:

public ActionResult MyImage()
{
    return File(@"c:\imagefolder\imagell.gif", "image/gif");
}

And then use this action:

<img src="<%= Url.Action("myimage") %>" alt="image description" />
Darin Dimitrov