Which code segment should you add at line 04?

You need to create a Web Part that adds a term set to the current SharePoint site collection’s
term store. You write the following code segment. (Line numbers are included for reference only.)
01Dim txtBoxTermSetToAdd As New System.Web.UI.WebControls.TextBox() 02Dim session As
New TaxonomySession(SPContext.Current.Site) 03Dim addedTerm As TermSet =
session.TermStores(0).Groups (“MyNewTermStore”).CreateTermSet(txtBoxTermSetToAdd.Text)
04 Which code segment should you add at line 04?

You need to create a Web Part that adds a term set to the current SharePoint site collection’s
term store. You write the following code segment. (Line numbers are included for reference only.)
01Dim txtBoxTermSetToAdd As New System.Web.UI.WebControls.TextBox() 02Dim session As
New TaxonomySession(SPContext.Current.Site) 03Dim addedTerm As TermSet =
session.TermStores(0).Groups (“MyNewTermStore”).CreateTermSet(txtBoxTermSetToAdd.Text)
04 Which code segment should you add at line 04?

A.
addedTerm.TermStore.CommitAll()

B.
SPContext.Current.Site.WebApplication.Update()

C.
addedTerm.Export()

D.
SPContext.Current.Web.AllowUnsafeUpdates = True



Leave a Reply 0

Your email address will not be published. Required fields are marked *