PrepAway - Latest Free Exam Questions & Answers

Category: 70-573 (v.1)

Exam 70-573: TS: Microsoft SharePoint 2010, Application Development (update October 30th, 2015)

Which code segment should you add at line 03?

You are creating an application. You develop a custom control that renders a contextual tab. The
control contains the following code segment. (Line numbers are included for reference only.)
01Protected Overloads Overrides Sub OnPreRender(ByVal e As EventArgs) 02 Dim curRibbon
As SPRibbon = SPRibbon.GetCurrent(Me.Page) 03 04

curRibbon.MakeContextualGroupInitiallyVisible (“SP.Ribbon.ContextualGroup”, String.Empty) 05
MyBase.OnPreRender(e) 06 End Sub You need to ensure that when the custom control is
rendered, the custom contextual tab appears in the Ribbon. Which code segment should you add
at line 03?

Which code segment should you add at line 03?

You have a SharePoint list named Announcements. You have an event receiver that contains the
following code segment. (Line numbers are included for reference only.) 01Public Overloads
Overrides Sub ItemAdding(ByVal properties As SPItemEventProperties) 02If
properties.ListItem(“Title”).ToString().Contains(“secret”) Then 03 04End If 05End Sub You need to
prevent users from adding items that contain the word “secret” in the title to the list. Which code
segment should you add at line 03?

You need to ensure that GridView1 only displays items from Announcements that have an expiry date that is grea

You create a Web Part. The Web Part contains a grid view named GridView1 and the following
code segment. (Line numbers are included for reference only.) 01 Dim dc As New
IntranetDataContext(“http://intranet”) 02 MyGridView.DataSource = From announce In
dc.Announcements _ 03 04 Select announce IntranetDataContext is a LINQ context. You need to
ensure that GridView1 only displays items from Announcements that have an expiry date that is
greater than or equal to the current date. What should you do?

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 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?

Which code segment should you add at line 02?

You have a list named Projects that contains a column named ClassificationMetadat a. You need
to create a Web Part that updates the ClassificationMetadata value to NA for each item in the
Projects list. You write the following code segment. (Line numbers are included for reference
only.) 01For Each currentItem As SPListItem In SPContext.Current.Web.Lists(“Projects”).Items 02
03Next Which code segment should you add at line 02?


Page 18 of 24« First...10...1617181920...Last »