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 ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για