RouteValueExpressionBuilder::GetRouteValue Method (Page^, String^, Type^, String^)
.NET Framework (current version)
Retrieves the value that corresponds to the specified URL parameter.
Assembly: System.Web (in System.Web.dll)
public: static Object^ GetRouteValue( Page^ page, String^ key, Type^ controlType, String^ propertyName )
Parameters
- page
-
Type:
System.Web.UI::Page^
The current page.
- key
-
Type:
System::String^
The URL parameter.
- controlType
-
Type:
System::Type^
The type of the control that the expression is bound to.
- propertyName
-
Type:
System::String^
The name of the property that is being set by the expression.
Return Value
Type: System::Object^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.
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.
.NET Framework
Available since 4.0
Available since 4.0
Show: