TaxonomyWebTaggingControl.SetValidatedTerms method
Sets the value of the Text property to correspond to the terms list, and triggers server-side validation of the new value.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Function SetValidatedTerms ( _
terms As List(Of Term), _
<OutAttribute> ByRef reason As String _
) As Boolean
'Usage
Dim instance As TaxonomyWebTaggingControl
Dim terms As List(Of Term)
Dim reason As String
Dim returnValue As Boolean
returnValue = instance.SetValidatedTerms(terms, _
reason)
public bool SetValidatedTerms(
List<Term> terms,
out string reason
)
Parameters
terms
Type: System.Collections.Generic.List<Term>A list of terms to be validated. The list can be empty, but this parameter must not be a null reference (Nothing in Visual Basic).
reason
Type: System.StringA localized string describing why the new terms list failed to validate. If all the terms are valid, or if the terms list is empty, this will contain String.Empty.
Return value
Type: System.Boolean
[true] if all of the terms specified in the terms list are valid; otherwise, [false].
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The terms parameter is a null reference (Nothing in Visual Basic). |
Remarks
The existing value of the control's Text property is overwritten, even when any terms in the terms list are invalid. If the list is empty, the Text property will be set to String.Empty.
See also
Reference
TaxonomyWebTaggingControl class