TaxonomyWebTaggingControl.SetValidatedTerms(List<Term>, String) TaxonomyWebTaggingControl.SetValidatedTerms(List<Term>, String) TaxonomyWebTaggingControl.SetValidatedTerms(List<Term>, String) Method

Definition

Sets the value of the Text property to correspond to the terms list, and triggers server-side validation of the new value.

public:
 bool SetValidatedTerms(System::Collections::Generic::List<Microsoft::SharePoint::Taxonomy::Term ^> ^ terms, [Runtime::InteropServices::Out] System::String ^ % reason);
public bool SetValidatedTerms (System.Collections.Generic.List<Microsoft.SharePoint.Taxonomy.Term> terms, out string reason);
Public Function SetValidatedTerms (terms As List(Of Term), ByRef reason As String) As Boolean
Parameters
terms
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
String String String

A 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 Empty.

Returns

true if all of the terms specified in the terms list are valid; otherwise, false.

Exceptions

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 Empty.

Applies to