IFormFieldValueProviderTryGetTValue Method |
Gets the value of the form field identified by its name.
Namespace: Kentico.Forms.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntaxbool 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:
BooleanReturns
true if field exists among the form fields.
ExceptionsException | Condition |
---|
ArgumentNullException | Thrown when fieldName is null. |
InvalidCastException | Thrown when the value of fieldName is not assignable to the TValue type. |
See Also