RouteValueExpressionBuilder.GetRouteValue(Page, String, Type, String) Method
Definition
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 the specified URL parameter.
public:
static System::Object ^ GetRouteValue(System::Web::UI::Page ^ page, System::String ^ key, Type ^ controlType, System::String ^ propertyName);
public static object GetRouteValue (System.Web.UI.Page page, string key, Type controlType, string propertyName);
static member GetRouteValue : System.Web.UI.Page * string * Type * string -> obj
Public Shared Function GetRouteValue (page As Page, key As String, controlType As Type, propertyName As String) As Object
Parameters
- page
- Page
The current page.
- key
- String
The URL parameter.
- controlType
- Type
The type of the control that the expression is bound to.
- propertyName
- String
The name of the property that is being set by the expression.
Returns
The value that corresponds to the specified URL parameter for the current page. If page
is null
, if the RouteData property of page
is null
, or if key
is empty or null
, the method returns null
.
Remarks
This method retrieves the appropriate value for the specified key
value by using the RouteData property of page
. It then uses the controlType
and propertyName
values to find the appropriate type converter in order to convert the retrieved value into the correct type.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈