string path=Server.MapPath("~"); //网站根目录,可向下继续延伸如"~/Images"或"~/Images/Project"
string path=Server.MapPath(Request.ApplicationPath + "/userphoto/")返回的是当前网站下面的userphoto目录的绝对路径。