HttpResponse.ApplyAppPathModifier(String) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Adiciona um ID de sessão ao caminho virtual se a sessão estiver a usar Cookieless o estado da sessão e devolve o caminho combinado. Se Cookieless o estado da sessão não for utilizado, devolve ApplyAppPathModifier(String) o caminho 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
O caminho virtual para um recurso.
Devoluções
Depois virtualPath com o ID da sessão inserido.
Exemplos
O exemplo seguinte declara uma variável string chamada urlConverted, e define-a como resultado de uma ApplyAppPathModifier chamada de método. O código passa então o valor da variável para a propriedade de NavigateUrl um HyperLink controlo.
// 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
Observações
ApplyAppPathModifier é usado apenas com sessões sem cookies para construir HREFs absolutos.