Redigera

Dela via


RouteUrlExpressionBuilder.EvaluateExpression Method

Definition

Creates a URL that corresponds to specified URL parameter values and to a route URL format.

public:
 override System::Object ^ EvaluateExpression(System::Object ^ target, System::Web::UI::BoundPropertyEntry ^ entry, System::Object ^ parsedData, System::Web::Compilation::ExpressionBuilderContext ^ context);
public override object EvaluateExpression (object target, System.Web.UI.BoundPropertyEntry entry, object parsedData, System.Web.Compilation.ExpressionBuilderContext context);
override this.EvaluateExpression : obj * System.Web.UI.BoundPropertyEntry * obj * System.Web.Compilation.ExpressionBuilderContext -> obj
Public Overrides Function EvaluateExpression (target As Object, entry As BoundPropertyEntry, parsedData As Object, context As ExpressionBuilderContext) As Object

Parameters

target
Object

Not used in this implementation.

entry
BoundPropertyEntry

The property that the expression is bound to.

parsedData
Object

Not used in this implementation.

context
ExpressionBuilderContext

Properties for the control or page.

Returns

The URL that corresponds to the specified URL parameter values and to the selected route. The route is selected by matching route URL patterns to the specified list of parameters. In case more than one route matches a specified list of parameters, a route name can also be specified to indicate which route to select.

Remarks

ASP.NET calls this method when an expression of the following form is encountered in markup:

<%$ RouteUrl: urlparameter=value %>

This method generates the appropriate URL for the specified route-key values for the current Route object. This method overrides the EvaluateExpression method. It gets from the entry parameter a reference to the control to which the expression is bound, it gets from the context parameter the expression to be evaluated, and it calls the GetRouteUrl method to generate the URL.

Applies to

See also