Share via


ModelStateDictionary.SetModelValue Method

Definition

Overloads

SetModelValue(String, ValueProviderResult)

Sets the value for the ModelStateEntry with the specified key.

SetModelValue(String, Object, String)

Sets the of RawValue and AttemptedValue for the ModelStateEntry with the specified key.

SetModelValue(String, ValueProviderResult)

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

Sets the value for the ModelStateEntry with the specified key.

public:
 void SetModelValue(System::String ^ key, Microsoft::AspNetCore::Mvc::ModelBinding::ValueProviderResult valueProviderResult);
public void SetModelValue (string key, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult valueProviderResult);
member this.SetModelValue : string * Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult -> unit
Public Sub SetModelValue (key As String, valueProviderResult As ValueProviderResult)

Parameters

key
String

The key for the ModelStateEntry entry

valueProviderResult
ValueProviderResult

A ValueProviderResult with data for the ModelStateEntry entry.

Applies to

SetModelValue(String, Object, String)

Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs
Source:
ModelStateDictionary.cs

Sets the of RawValue and AttemptedValue for the ModelStateEntry with the specified key.

public:
 void SetModelValue(System::String ^ key, System::Object ^ rawValue, System::String ^ attemptedValue);
public void SetModelValue (string key, object rawValue, string attemptedValue);
public void SetModelValue (string key, object? rawValue, string attemptedValue);
public void SetModelValue (string key, object? rawValue, string? attemptedValue);
member this.SetModelValue : string * obj * string -> unit
Public Sub SetModelValue (key As String, rawValue As Object, attemptedValue As String)

Parameters

key
String

The key for the ModelStateEntry entry.

rawValue
Object

The raw value for the ModelStateEntry entry.

attemptedValue
String

The values of rawValue in a comma-separated String.

Applies to