想获取这个路径:http://forum.csdn.net/PointForum/Forum/PostTopic.aspx
请尽量描述详细些。(IIS发布的路径也可以)环境:vs2005 谢谢
把这个路径赋值给string abc

解决方案 »

  1.   


            string abc = Request.Url.ToString();
      

  2.   

    获取当前浏览器地址
    string abc=HttpContext.Current.Request.Url.PathAndQuery.ToString()
      

  3.   


    string abc=HttpContext.Current.Request.Url.AbsoluteUri.ToString()
      

  4.   

    http://localhost/Login.aspx对于这个网址,现在只能获取到Login.aspx了,还有主机地址呢
      

  5.   

    遍历下servervariables就知道什么是想要的了。
      

  6.   

    string abc = System.Web.HttpContext.Current.Request.ServerVariables("URL");