Label1.Text=Server.MapPath(""); //返回值为d:\inetpub\wwwroot\yxbwebapplication
File.Exists(Server.MapPath("image\\")+"my.bmp");//其路径为d:\inetpub\wwwroot\yxbwebapplication\image\my.bmp
Label1.Text=AppDomain.CurrentDomain.BaseDirectory;//返回值为d:/inetpub/wwwroot/yxbwebapplication/
非常有用的写法(在网页中有个存放图片的image目录下图片的路径)
Image1.ImageUrl="image\\TOP.bmp";