ASP. NET gets the URL of the current URL

Source: Internet
Author: User

Request.rawurl: Gets the URL information for the client request (not including the host and port)------>/a/default2.aspx
Request.applicationpath: Gets the virtual path of an ASP. NET application on the server. ------>/
Request.currentexecutionfilepath: Gets the virtual path of the current request. ------>/default2.aspx
Request.path: Gets the virtual path of the current request. ------>/default2.aspx
Request.pathinfo: Takes additional path information for a resource with a URL extension------> Http://so.com/page.html/tail, the value is/tail
Request.PhysicalPath: Gets the physical file system path that corresponds to the requested URL. ------>e:\temp\default2.aspx

Request.url: Get the full URL (protocol name + domain + site name + file name + parameter)------>http://www.baidu.com/a/b?c=1

Request.Url.Host: Gets the domain name (not including the port)------>www.baidu.com

Request.Url.Query: Get parameters (starting from)------>? a=1&b=2
Request.Url.LocalPath: Station name + file name------>/default2.aspx
Request.Url.AbsoluteUri: Gets the base Url (without parameters)------>http://localhost:8080/default2.aspx
Request.Url.AbsolutePath: Station name + file name----->/default2.aspx

Reference article: http://www.cnblogs.com/190196539/archive/2011/12/13/2286072.html

ASP. NET gets the URL of the current URL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.