HttpResponse.ApplyAppPathModifier(String) Metoda

Definice

Pokud relace používá Cookieless stav relace, přidá k virtuální cestě ID relace a vrátí kombinovanou cestu. Pokud Cookieless stav relace není použit, ApplyAppPathModifier(String) vrátí původní virtuální cestu.

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

Parametry

virtualPath
String

Virtuální cesta k prostředku.

Návraty

S virtualPath vloženým ID relace.

Příklady

Následující příklad deklaruje řetězcovou proměnnou s názvem urlConverteda nastaví ji na výsledek ApplyAppPathModifier volání metody. Kód pak předá hodnotu proměnné vlastnosti HyperLink ovládacího prvku NavigateUrl .

// 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

Poznámky

ApplyAppPathModifier se používá pouze s relacemi bez souborů cookie k vytvoření absolutních href.

Platí pro