Click or drag to resize
IFormFieldValueProviderTryGetTValue Method
Gets the value of the form field identified by its name.

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
bool TryGet<TValue>(
	string fieldName,
	out TValue value
)

Parameters

fieldName
Type: SystemString
Name of the field.
value
Type: TValue
The value of given field or null in case the field doesn't exist in the form.

Type Parameters

TValue
Type of the value to retrieve.

Return Value

Type: Boolean
Returns true if field exists among the form fields.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when fieldName is null.
InvalidCastExceptionThrown when the value of fieldName is not assignable to the TValue type.
See Also