Reputation: 58963
to get some images' path server side i use HttpContext.Current.Request.ApplicationPath to build up a correct path.
It works on the production environment, but it gets resolved as "/" on the developement / debug server provided by VS2008.
Upvotes: 2
Views: 4538
Reputation: 115877
Just use HttpServerUtility.MapPath("~/images")
. The "~" denotes application root.
Upvotes: 0
Reputation: 39956
You can use
HttpContext.Curent.Server.MapPath("/*****");
<- this will give you correct path..
Upvotes: 1