asp.net 获取当前目录的方法

asp.net 获取当前目录的方法

  方法一:

  string sPath = System.IO.Path.GetDirectoryName(Page.Request.PhysicalPath)

  方法二:

  string sPath = System.Web.HttpContext.Current.Request.MapPath("images/")

  方法三:

  string sPath = Page.Server.MapPath("images/");

posted @ 2011-10-26 12:55  H.H.H  阅读(202)  评论(0编辑  收藏  举报