다음을 통해 공유


RouteUrlExpressionBuilder.GetRouteUrl(Control, String) 메서드

정의

경로 URL 형식의 지정된 경로 키에 해당하는 URL을 만듭니다.

public:
 static System::String ^ GetRouteUrl(System::Web::UI::Control ^ control, System::String ^ expression);
public static string GetRouteUrl (System.Web.UI.Control control, string expression);
static member GetRouteUrl : System.Web.UI.Control * string -> string
Public Shared Function GetRouteUrl (control As Control, expression As String) As String

매개 변수

control
Control

식이 바인딩되는 컨트롤입니다.

expression
String

태그에 지정된 식입니다.

반환

String

현재 Route 개체의 경로 URL 형식에 해당하는 URL입니다.

예외

control 매개 변수가 null인 경우

이 메서드는 태그에 지정된 식을 구문 분석할 수 없습니다. 자세한 내용은 TryParseRouteExpression(String, RouteValueDictionary, String)를 참조하세요.

설명

이 메서드를 호출 하 여 URL에 대 한 적절 한 값을 생성 합니다 GetVirtualPath 메서드는 RouteCollection 개체입니다. 가져와서 합니다 RequestContext 에서 개체를 control 매개 변수를 구문 분석에서 경로 이름 및 경로 매개 변수를 expression 매개 변수입니다.

적용 대상

추가 정보