RouteUrlExpressionBuilder.GetRouteUrl(Control, String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
경로 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 구문 분석합니다.