This documentation is archived and is not being maintained.

RouteUrlExpressionBuilder::EvaluateExpression Method

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

Namespace:  System.Web.Compilation
Assembly:  System.Web (in System.Web.dll)

public:
virtual Object^ EvaluateExpression(
	Object^ target, 
	BoundPropertyEntry^ entry, 
	Object^ parsedData, 
	ExpressionBuilderContext^ context
) override

Parameters

target
Type: System::Object
Not used in this implementation.
entry
Type: System.Web.UI::BoundPropertyEntry
The property that the expression is bound to.
parsedData
Type: System::Object
Not used in this implementation.
context
Type: System.Web.Compilation::ExpressionBuilderContext
Properties for the control or page.

Return Value

Type: System::Object
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.

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.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: