NameValueCollectionValueProvider.GetValue 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳指定鍵值。
多載
| 名稱 | Description |
|---|---|
| GetValue(String) |
回傳指定鍵值。 |
| GetValue(String, Boolean) |
回傳指定金鑰的值,並可選擇性地讓呼叫者指定是否應該跳過請求驗證。 |
GetValue(String)
回傳指定鍵值。
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
索引鍵。
傳回
指定索引鍵的值。
實作
備註
呼叫此方法等同於呼叫GetValue方法過載並傳遞falseskipValidation參數。
適用於
GetValue(String, Boolean)
回傳指定金鑰的值,並可選擇性地讓呼叫者指定是否應該跳過請求驗證。
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
索引鍵。
- skipValidation
- Boolean
true跳過驗證;否則,。 false
傳回
指定索引鍵的值。