PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

You need to ensure that the .NET application displays the title of the SharePoint Web application in textBoxTi

You have a SharePoint Web application that has the URL http://intranet. You are creating a
Microsoft .NET Framework application that will display the title of the SharePoint Web application
and will execute outside of the SharePoint server. You create a textbox named textBoxTitle. You
write the following code segment. (Line numbers are included for reference only.) 01Dim context
As New ClientContext(“http://intranet”) 02 03Dim site As Web = context.Web 04context.Load(site)
05 06textBoxTitle.Text = site.Title You discover that line 04 generates an error. You need to
ensure that the .NET application displays the title of the SharePoint Web application in
textBoxTitle. What should you do?

Which approach should you recommend?

You are designing an ASP.NET Web Forms application. The Web application has a heavy
reliance on view state. You are designing the Web application for use in regions that have
limited or low-bandwidth connectivity. You have the following requirements: • Decrease
bandwidth requirements. • Prevent any user from obtaining any part of the view state. • Do
not require changes to existing pages, user controls, or code-behind files that rely on the
view state. You need to ensure that the Web application meets these requirements. Which
approach should you recommend?

Which code element should you add at line 09?

You have a Microsoft .NET Framework console application that uses the SharePoint client object
model. The application contains the following code segment. (Line numbers are included for
reference only.) 01 Dim cCtx As ClientContext = New ClientContext(“http://contoso/sites/finance”)
02 Dim root As Web = cCtx.Site.RootWeb 03 cCtx.Load(root) 04 Dim webInfo As
WebCreationInformation = New WebCreationInformation 05 webInfo.Title = “site1” 06 webInfo.Url
= “site1” 07 webInfo.WebTemplate = “MPS#2” 08 root.Webs.Add(webInfo) 09 10 cCtx.Dispose
You need to ensure that the application queries Shared Documents for a document named
Doc1.docx. Which code element should you add at line 09?