MapPath function is commonly used in Asp.net. But if you want to used in other projects like DLL project, User difined control, you should reference System.Web namespace and call HttpContext.Current.Server.MapPath. HttpServerUtility does not support it. eg: string filepath = "~/Upload/test.jpg"; HttpContext.Current.Server.MapPath(filepath);
posted on 2009-04-29 14:25  蔡春升  阅读(158)  评论(0编辑  收藏  举报