nerdexam
Microsoft

70-573 · Question #35

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.) 01…

The correct answer is A. 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.) 01 TaxonomySession session = new TaxonomySession ( SPContext.Current..Site ) ; 02 TermSet addedTerm = session.TermStores [O] .Groups [" MyNewTermStore "] . CreateTermSet ( txtBoxTermSetToAdd.Text ) ; 03 Which code segment should you add at line 03?

Options

  • AaddedTerm.TermStore.CommitAll ();
  • BaddedTerm.Export ();
  • CSPContext.Current.Web.AllouUnsafeUpdates = true;
  • DSPContext.Current.Site.WebAppllcation.Update ();

How the community answered

(23 responses)
  • A
    74% (17)
  • B
    4% (1)
  • C
    13% (3)
  • D
    9% (2)

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice