Table of Contents

Interface IFormFieldValueProvider

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Provides values of form fields.

public interface IFormFieldValueProvider
Extension Methods

Methods

TryGet<TValue>(string, out TValue)

Gets the value of the form field identified by its name.

bool TryGet<TValue>(string fieldName, out TValue value)

Parameters

fieldName string

Name of the field.

value TValue

The value of given field or null in case the field doesn't exist in the form.

Returns

bool

Returns true if field exists among the form fields.

Type Parameters

TValue

Type of the value to retrieve.

Exceptions

ArgumentNullException

Thrown when fieldName is null.

InvalidCastException

Thrown when the value of fieldName is not assignable to the TValue type.