An introduction to the meanings of the various properties of Request.url in ASP.

Source: Internet
Author: User

Ext.: http://www.jb51.net/article/30254.htm

Path to the virtual directory: Request.applicationpath

Physical path to the site (full path): Request.PhysicalPath

Directory of site physical paths: System.IO.Path.GetDirectoryName (Request.PhysicalPath)

Directory of site physical paths: Request.physicalapplicationpath

File name of the current page: System.IO.Path.GetFileName (Request.PhysicalPath)

Virtual path of the current page: Request.currentexecutionfilepath

Virtual path of the current page: Request.filepath Request.path

Original URL:REQUEST.RAWURL

Absolute path (excluding parameters, etc.): Request.Url.AbsolutePath

Absolute URL:Request.Url.AbsoluteUri

URL protocol scheme: Request.Url.Scheme

Host name of the URL: Request.Url.Host

URL Port number: Request.Url.Port

Host name + port number: Request.Url.Authority

Gets the local operating system representation of the file name: Request.Url.LocalPath

Additional path information, such as Http://xxxx/UrlDemo.aspx/Hello?id=22#top so this is Hello:Request.PathInfo.

URL's path and get parameters: Request.Url.PathAndQuery

URL's Get parameter: Request.Url.Query

Mainly refers to the http://xxxx/UrlDemo.aspx/Hello?id=22#top in the back of the top.
In general, however, the value cannot be obtained because the browser does not send this value to the server side
Request.Url.Fragment

Host Name: Request.Url.DnsSafeHost

URL All: Request.Url.OriginalString

This is the case: URI uriaddress = new Uri ("Http://user:[email protected]/index.htm") Console.WriteLine (Uriaddress.userinfo); Request.Url.UserInfo

When you jump from a page, the value of the source page is displayed: Request.urlreferrer

Each segment of the URI
for (var i = 0; i < request.url.segments.length;i++)
{
Request.Url.Segment "+ i +": request.url.segments[i]
}

An introduction to the meanings of the various properties of Request.url in ASP.

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.