Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

HttpRequest.RawUrl Property

Gets the raw URL of the current request.

[Visual Basic]
Public ReadOnly Property RawUrl As String
[C#]
public string RawUrl {get;}
[C++]
public: __property String* get_RawUrl();
[JScript]
public function get RawUrl() : String;

Property Value

The raw URL of the current request.

Remarks

The raw URL is defined as the part of the URL following the domain information. In the URL string http://www.contoso.com/articles/recent.aspx, the raw URL is/articles/recent.aspx. The raw URL includes the query string, if present.

Example

The following example assigns the raw URL string of the current request to a string variable.

[Visual Basic] 
Dim MyUrl As String
 MyUrl = Request.RawUrl
   

[C#] 
String MyUrl = Request.RawUrl;
   

[C++] 
String* MyUrl = Request->RawUrl;
   

[JScript] 
var myUrl : String = Request.RawUrl
   

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.