HttpRequest.RawUrl プロパティ

定義

現在の要求の生の URL を取得します。

public:
 property System::String ^ RawUrl { System::String ^ get(); };
public string RawUrl { get; }
member this.RawUrl : string
Public ReadOnly Property RawUrl As String

プロパティ値

現在の要求の生の URL。

次のコード例では、 メソッドを HtmlEncode 使用して プロパティの値を RawUrl HTML エンコードし、 メソッドを WriteLine 使用してエンコードされた値をファイルに書き込みます。 このコード例は、HttpRequest クラスのために提供されている大規模な例の一部です。

// Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath));
sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath));
sw.WriteLine(Server.HtmlEncode(Request.RawUrl));
' Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath))
sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath))
sw.WriteLine(Server.HtmlEncode(Request.RawUrl))

注釈

生 URL は、ドメイン情報に続く URL の一部として定義されます。 URL 文字列 http://www.contoso.com/articles/recent.aspxでは、生の URL は /articles/recent.aspx です。 生 URL には、クエリ文字列 (存在する場合) が含まれます。

適用対象