nerdexam
Microsoft

70-573 · Question #116

You are creating a Microsoft .NET Framework console application that will use the SharePoint client object model to create a site in the site collection. The application contains the following code…

The correct answer is A. cCtx.ExecuteQuery(). See the full explanation below for the reasoning.

Question

You are creating a Microsoft .NET Framework console application that will use the SharePoint client object model to create a site in the site collection. The application contains the following code segment. (Line numbers are included for reference only.) 02Dim root As Web = cCtx.Site.RootWeb 03cCtx.Load(root) 04Dim webInfo As New WebCreationInformation() 05webInfo.Title = "site1" 06webInfo.Url = "site1" 07webInfo.WebTemplate = "MPS#2" 08root.Webs.Add(webInfo) 09 10cCtx.Dispose() You need to ensure that the application creates the site. Which code segment should you add at line 09?

Options

  • AcCtx.ExecuteQuery()
  • BcCtx.Site.RootWeb.Update()
  • Croot.Context.Dispose()
  • Droot.Update()

How the community answered

(69 responses)
  • A
    70% (48)
  • B
    16% (11)
  • C
    9% (6)
  • D
    6% (4)

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice