nerdexam
Microsoft

70-573 · Question #117

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…

The correct answer is B. addedTerm.TermStore.CommitAll(). See the full explanation below for the reasoning.

Question

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?

Options

  • AaddedTerm.Export()
  • BaddedTerm.TermStore.CommitAll()
  • CSPContext.Current.Site.WebApplication.Update()
  • DSPContext.Current.Web.AllowUnsafeUpdates = True

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    85% (23)
  • C
    4% (1)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice