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

태그에 지정된 식입니다.

반품

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

예외

매개 변수는 control .입니다 null.

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

설명

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

적용 대상

추가 정보