HttpResponse.ApplyAppPathModifier(String) Método

Definición

Agrega un identificador de sesión a la ruta de acceso virtual si la sesión usa un estado de sesión Cookieless y devuelve la ruta combinada. Si no se usa el estado de sesión Cookieless, ApplyAppPathModifier(String) devuelve la ruta de acceso virtual original.

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

Parámetros

virtualPath
String

Ruta de acceso virtual a un recurso.

Devoluciones

virtualPath con el identificador de sesión insertado.

Ejemplos

En el ejemplo siguiente se declara una variable de cadena denominada urlConvertedy se establece en el resultado de una ApplyAppPathModifier llamada de método. A continuación, el código pasa el valor de la variable a la propiedad de NavigateUrl un HyperLink control.

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

Comentarios

ApplyAppPathModifier solo se usa con sesiones sin cookies para construir HREF absolutos.

Se aplica a