Share via


HttpResponse.ApplyAppPathModifier(String) 메서드

정의

세션이 Cookieless 세션 상태를 사용하고 있는 경우 가상 경로에 세션 ID를 추가한 다음 조합된 경로를 반환합니다. Cookieless 세션 상태가 사용되지 않을 경우 ApplyAppPathModifier(String)는 원본 가상 경로를 반환합니다.

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

매개 변수

virtualPath
String

리소스에 대한 가상 경로입니다.

반환

String

세션 ID가 삽입된 virtualPath입니다.

예제

다음 예제에서는 명명 urlConverted된 문자열 변수를 선언하고 메서드 호출의 ApplyAppPathModifier 결과로 설정합니다. 그런 다음 코드는 변수의 값을 컨트롤의 NavigateUrl 속성에 HyperLink 전달합니다.

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

설명

ApplyAppPathModifier 는 절대 HREF를 생성하기 위해 쿠키 없는 세션에만 사용됩니다.

적용 대상