How do I get the complete virtual path of an ASP.NET application

前端 未结 6 435
别跟我提以往
别跟我提以往 2021-01-31 08:52

How do I know the the complete virtual path that my application is currently hosted? For example:

http://www.mysite.com/myApp

or



        
6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 09:23

    Request.Url
    

    it contains several points that you might consider to use, see the image below:

    enter image description here

提交回复
热议问题