ValueProviderCollection.GetValue Method

Definition

Returns a value object using the specified key.

Overloads

GetValue(String)

Returns a value object using the specified key.

GetValue(String, Boolean)

Returns a value object using the specified key and optionally specifies whether validation should be skipped.

GetValue(String)

Returns a value object using the specified key.

C#
public virtual System.Web.ModelBinding.ValueProviderResult GetValue(string key);

Parameters

key
String

The key of the value object to retrieve.

Returns

The value object.

Implements

Remarks

This method calls GetValue(String, Boolean), passing false for the skipValidation parameter.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

GetValue(String, Boolean)

Returns a value object using the specified key and optionally specifies whether validation should be skipped.

C#
public virtual System.Web.ModelBinding.ValueProviderResult GetValue(string key, bool skipValidation);

Parameters

key
String

The key of the value object to retrieve.

skipValidation
Boolean

true to skip validation; otherwise, false.

Returns

The value object.

Implements

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1