2011年4月8日星期五

virtual path to absolute path

Converts a virtual path to an application absolute path.
VirtualPathUtility.ToAbsolute("~/media/images/" + panel.Id)

use MapPath to resolve virtual paths and physical paths.
HttpContext.Current.Server.MapPath(@"xml/content/" + lXmlFile);
HttpContext.Current.Request.MapPath(@"xml/content/" + lXmlFile);