This documentation is archived and is not being maintained.
RouteValueExpressionBuilder::GetRouteValue Method
Visual Studio 2010
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::ObjectThe value that corresponds to the specified URL parameter for the current page. If page is nullptr, if the RouteData property of page is nullptr, or if key is empty or nullptr, the method returns nullptr.
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.
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: