Wednesday 19 November 2014

Get Url Reference - asp.net

Leave a Comment
This is just for reference to get the URL based on HttpRequest Class.

You can call the method below :

Request.ApplicationPath :   /virtual_dir

Request.CurrentExecutionFilePath :  /virtual_dir/webapp/page.aspx

Request.FilePath :  /virtual_dir/webapp/page.aspx

Request.Path :  /virtual_dir/webapp/page.aspx

Request.PhysicalApplicationPath :   d:\Inetpub\wwwroot\virtual_dir\

Request.QueryString :   /virtual_dir/webapp/page.aspx?q=qvalue

Request.Url.AbsolutePath :  /virtual_dir/webapp/page.aspx

Request.Url.AbsoluteUri :   http://localhost:2000/virtual_dir/webapp/page.aspx?q=qvalue

Request.Url.Host :  localhost

Request.Url.Authority : localhost:80

Request.Url.LocalPath : /virtual_dir/webapp/page.aspx

Request.Url.PathAndQuery :  /virtual_dir/webapp/page.aspx?q=qvalue

Request.Url.Port :  80

Request.Url.Query : ?q=qvalue

Request.Url.Scheme :    http

Request.Url.Segments :  /

    virtual_dir/

    webapp/

    page.aspx





By
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)
Read More...

Subscribe to our newsletter to get the latest updates to your inbox.

Your email address is safe with us!




Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or .



Powered by Blogger.