HttpResponse.ApplyAppPathModifier(String) Methode

Definitie

Voegt een sessie-id toe aan het virtuele pad als de sessie de sessiestatus gebruikt Cookieless en het gecombineerde pad retourneert. Als Cookieless de sessiestatus niet wordt gebruikt, ApplyAppPathModifier(String) wordt het oorspronkelijke virtuele pad geretourneerd.

public:
 System::String ^ ApplyAppPathModifier(System::String ^ virtualPath);
public string ApplyAppPathModifier(string virtualPath);
member this.ApplyAppPathModifier : string -> string
Public Function ApplyAppPathModifier (virtualPath As String) As String

Parameters

virtualPath
String

Het virtuele pad naar een resource.

Retouren

De virtualPath met de sessie-id ingevoegd.

Voorbeelden

In het volgende voorbeeld wordt een tekenreeksvariabele met de naam urlConvertedgede declareerd en wordt deze ingesteld op het resultaat van een ApplyAppPathModifier methodeaanroep. De code geeft vervolgens de waarde van de variabele door aan de eigenschap van HyperLink een NavigateUrl besturingselement.

// Declare a string variable and set it to the result
// of a call to the ApplyAppPathModifier method.
// Then set the NavigateUrl property of a Hyperlink control
// to the string's value.
string urlConverted = Response.ApplyAppPathModifier("TestPage.aspx");
hlTest1.NavigateUrl = urlConverted;
' Declare a string variable and set it to the result
' of a call to the ApplyAppPathModifier method.
' Then set the NavigateUrl property of a Hyperlink control
' to the string's value.
Dim urlConverted As String = Response.ApplyAppPathModifier("TestPage.aspx")
hlTest1.NavigateUrl = urlConverted

Opmerkingen

ApplyAppPathModifier wordt alleen gebruikt met sessies zonder cookies om absolute HREF's samen te stellen.

Van toepassing op