NameValueCollectionValueProvider.GetValue 方法
定义
返回指定键中的值。Returns the value for the specified key.
重载
| GetValue(String) |
返回指定键中的值。Returns the value for the specified key. |
| GetValue(String, Boolean) |
返回指定的密匙和可选择使调用方可以指定是否要求验证应跳过的值。Returns the value for the specified key and optionally enables the caller to specify whether request validation should be skipped. |
GetValue(String)
返回指定键中的值。Returns the value for the specified key.
public:
virtual System::Web::ModelBinding::ValueProviderResult ^ GetValue(System::String ^ key);
public virtual System.Web.ModelBinding.ValueProviderResult GetValue (string key);
abstract member GetValue : string -> System.Web.ModelBinding.ValueProviderResult
override this.GetValue : string -> System.Web.ModelBinding.ValueProviderResult
Public Overridable Function GetValue (key As String) As ValueProviderResult
参数
- key
- String
键。The key.
返回
指定键的值。The value for the specified key.
实现
注解
调用此方法等效于调用 GetValue 方法重载并 false 为 skipValidation 参数传递。Calling this method is equivalent to calling the GetValue method overload and passing false for the skipValidation parameter.
适用于
GetValue(String, Boolean)
返回指定的密匙和可选择使调用方可以指定是否要求验证应跳过的值。Returns the value for the specified key and optionally enables the caller to specify whether request validation should be skipped.
public:
virtual System::Web::ModelBinding::ValueProviderResult ^ GetValue(System::String ^ key, bool skipValidation);
public virtual System.Web.ModelBinding.ValueProviderResult GetValue (string key, bool skipValidation);
abstract member GetValue : string * bool -> System.Web.ModelBinding.ValueProviderResult
override this.GetValue : string * bool -> System.Web.ModelBinding.ValueProviderResult
Public Overridable Function GetValue (key As String, skipValidation As Boolean) As ValueProviderResult
参数
- key
- String
键。The key.
- skipValidation
- Boolean
如果跳过验证,则为 true;否则为 false。true to skip validation; otherwise, false.
返回
指定键的值。The value for the specified key.