RouteValueExpressionBuilder Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the value that corresponds to a specified URL parameter in a routed page.
public ref class RouteValueExpressionBuilder : System::Web::Compilation::ExpressionBuilder
public class RouteValueExpressionBuilder : System.Web.Compilation.ExpressionBuilder
type RouteValueExpressionBuilder = class
inherit ExpressionBuilder
Public Class RouteValueExpressionBuilder
Inherits ExpressionBuilder
- Inheritance
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".
The RouteValueExpressionBuilder class makes it possible to use markup to set the property of a server control to the value of one of the URL parameters in a routed page.
Route |
Initializes a new instance of the RouteValueExpressionBuilder class. |
Supports |
Gets a value that indicates whether an expression can be evaluated in a page that is not compiled. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Evaluate |
Retrieves the value that corresponds to a specified route key. |
Get |
Returns a code expression that is used to perform the property assignment in the generated page class. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Retrieves the value that corresponds to the specified URL parameter. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Parse |
When overridden in a derived class, returns an object that represents the parsed expression. (Inherited from ExpressionBuilder) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Proizvod | Verzije |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Povratne informacije o proizvodu .NET
.NET je projekt otvorenog koda. Odaberite vezu za slanje povratnih informacija: