This documentation is archived and is not being maintained.
RouteValueExpressionBuilder Class
Visual Studio 2010
Retrieves the value that corresponds to a specified URL parameter in a routed page.
System::Object
System.Web.Compilation::ExpressionBuilder
System.Web.Compilation::RouteValueExpressionBuilder
System.Web.Compilation::ExpressionBuilder
System.Web.Compilation::RouteValueExpressionBuilder
Assembly: System.Web (in System.Web.dll)
The RouteValueExpressionBuilder type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | RouteValueExpressionBuilder | Initializes a new instance of the RouteValueExpressionBuilder class. |
| Name | Description | |
|---|---|---|
![]() | SupportsEvaluate | Gets a value that indicates whether an expression can be evaluated in a page that is not compiled. (Overrides ExpressionBuilder::SupportsEvaluate.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | EvaluateExpression | Retrieves the value that corresponds to a specified route key. (Overrides ExpressionBuilder::EvaluateExpression(Object, BoundPropertyEntry, Object, ExpressionBuilderContext).) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetCodeExpression | Returns a code expression that is used to perform the property assignment in the generated page class. (Overrides ExpressionBuilder::GetCodeExpression(BoundPropertyEntry, Object, ExpressionBuilderContext).) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetRouteValue | Retrieves the value that corresponds to the specified URL parameter. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ParseExpression | When overridden in a derived class, returns an object that represents the parsed expression. (Inherited from ExpressionBuilder.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The following example shows how to use markup to display the value of the URL parameter searchterm. The route is defined by using http://www.contoso.com/search/{searchterm} as the URL pattern.
<asp:Label ID="Label1" runat="server"
text="<%$ RouteValue:searchterm %>">
</asp:Label>
If the page is requested with the URL http://www.contoso.com/search/Bicycles, the Label control displays "Bicycles".
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:



