// Format will be <%$ ExpPrefix: RouteName = <name>, Key=Value, Key2=Value2 %>
public static string GetRouteUrl(Control control, string expression) {
if (control == null) {
throw new ArgumentNullException("control");
}
string routeName = null;
RouteValueDictionary routeParams = new RouteValueDictionary();
if (TryParseRouteExpression(expression, routeParams, out routeName)) {
return control.GetRouteUrl(routeName, routeParams);
}
else {
throw new InvalidOperationException(SR.GetString(SR.RouteUrlExpression_InvalidExpression));
}
}