共用方式為


NameValueCollectionValueProvider.GetValue 方法

定義

多載

GetValue(String)

使用指定的索引鍵傳回值物件。

GetValue(String, Boolean)

使用指定的索引鍵和驗證指示詞,傳回值物件。

GetValue(String)

使用指定的索引鍵傳回值物件。

public virtual System.Web.Mvc.ValueProviderResult GetValue (string key);
abstract member GetValue : string -> System.Web.Mvc.ValueProviderResult
override this.GetValue : string -> System.Web.Mvc.ValueProviderResult
Public Overridable Function GetValue (key As String) As ValueProviderResult

參數

key
String

要擷取之值物件的索引鍵。

傳回

指定之索引鍵的值物件。

實作

例外狀況

key 參數為 null。

適用於

GetValue(String, Boolean)

使用指定的索引鍵和驗證指示詞,傳回值物件。

public virtual System.Web.Mvc.ValueProviderResult GetValue (string key, bool skipValidation);
abstract member GetValue : string * bool -> System.Web.Mvc.ValueProviderResult
override this.GetValue : string * bool -> System.Web.Mvc.ValueProviderResult
Public Overridable Function GetValue (key As String, skipValidation As Boolean) As ValueProviderResult

參數

key
String

索引鍵。

skipValidation
Boolean

如果應該略過驗證,則為 true;否則為 false。

傳回

指定之索引鍵的值物件。

實作

適用於