Providing the path to an image stored on the server, not in the application files

Posted by twal on Stack Overflow See other posts from Stack Overflow or by twal
Published on 2010-06-17T15:20:45Z Indexed on 2010/06/17 15:23 UTC
Read the original article Hit count: 253

Filed under:
|

I need to display images on my ASP.NET MVC page that will be stored on the server i have an apphelper class that I can use to provide the path

like this

public static class AppHelper { public static string ImageLowResPath(string imageName) {

}

}

How can I get the file path that is stored on the c: drive of the server here?

In my view I will get the filepath like this

img src='<%=AppHelper.ImagelowResPath("10-1010.jpg") %>'

Thank you

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc-2