Editare

Partajați prin


RouteValueExpressionBuilder.EvaluateExpression Method

Definition

Retrieves the value that corresponds to a specified route key.

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

The control that the expression is bound to.

entry
BoundPropertyEntry

The property that the expression is bound to.

parsedData
Object

(This parameter is not used in this implementation.)

context
ExpressionBuilderContext

Properties for the control or page.

Returns

The value that corresponds to the URL parameter that is specified for the current page. The method returns null if target is null or if it does not derive from Control.

Remarks

ASP.NET calls this method when an expression of the form <%$ RouteValue:urlparameter %> is encountered in a no-compile page. This method overrides the EvaluateExpression method by calling the GetRouteValue method. It gets the Page object from the context parameter, and it gets the expression, the control type, and the property name from the entry parameter.

Applies to

See also