Aracılığıyla paylaş


HttpResponse.ApplyAppPathModifier(String) Yöntem

Tanım

Oturum, oturum durumunu kullanıyorsa Cookieless sanal yola bir oturum kimliği ekler ve birleşik yolu döndürür. Oturum durumu kullanılmıyorsa Cookieless , ApplyAppPathModifier(String) özgün sanal yolu döndürür.

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

Parametreler

virtualPath
String

Bir kaynağın sanal yolu.

Döndürülenler

String

virtualPath Oturum kimliğinin eklendiği.

Örnekler

Aşağıdaki örnek adlı urlConvertedbir dize değişkeni bildirir ve bunu bir ApplyAppPathModifier yöntem çağrısının sonucuna ayarlar. Kod daha sonra değişkenin değerini denetimin HyperLink NavigateUrl özelliğine geçirir.

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

Açıklamalar

ApplyAppPathModifier yalnızca mutlakHREF'ler oluşturmak için tanımlama bilgisi olmayan oturumlarla kullanılır.

Şunlara uygulanır