[Pass Ensure VCE Dumps] Testing PassLeader 70-573 Exam Questions and Answers To 100% Pass 70-573 Exam (201-220)
How To 100% Pass New 70-573 Exam: PassLeader have been launched the newest 285q 70-573 exam dumps with all the new updated exam questions. We provide the latest full version of 70-573 PDF and VCE dumps with new real questions and answers to ensure your 70-573 exam 100% pass, and you will get the free new version VCE Player along with your 70-573 VCE dumps. Welcome to visit our website — passleader.com — and get the premium 285q 70-573 exam questions.
keywords: 70-573 exam,285q 70-573 exam dumps,285q 70-573 exam questions,70-573 pdf dumps,70-573 vce dumps,70-573 study guide,70-573 practice test,TS: Microsoft SharePoint 2010, Application Development Exam
QUESTION 201
You are developing an application page. You need to create a pop-up window that uses the ECMAScript object model. Which namespace should you use?
A. SP.UI.Menu
B. SP.UI.ModalDialog
C. SP.UI.Notify
D. SP.UI.PopoutMenu
Explanation:
MNEMONIC RULE: “pop-up window = ModalDialog”
SP.UI.ModalDialog Class
http://msdn.microsoft.com/en-us/library/ff408909.aspx
QUESTION 202
You have a SharePoint site that has the URL http://contoso.com/hr. You are creating a new Web Part. You need to create a reference to the current subsite without having to dispose of any returned objects. Which code segment should you use?
A. Dim siteCollection As New SPSite(“http://www.contoso.com”)
Dim site As SPWebCollection = siteCollection.AllWebs
B. Dim siteCollection As New SPSite(“http://www.contoso.com”)
Dim site As SPWeb = siteCollection.RootWeb
C. Dim site As SPSite = SPContext.Current.Site
D. Dim site As SPWeb = SPContext.Current.Web
Answer: D
QUESTION 203
You create a Feature. You need to add an item to the context menu of a list. Which type of element should you use?
A. a Listlnstance
B. a ListTemplate
C. a CustomAction
D. a Module
Answer: C
Explanation:
MNEMONIC RULE: “context menu item = CustomAction”
A custom action can be added inside a secondary XML file, part of a normal feature. It is defined by a”CustomAction” element type.
How to add a custom action to list elements context menu?
http://www.dev4side.com/community/technical-articles/sharepoint-2007/how-to-add-a-custom-action-to-listelements-context-menu.aspx
QUESTION 204
You are creating a Web Part. The Web Part will be used in a SharePoint subsite that has the URL http://www.contoso.com/hr. You need to ensure that the Web Part activates a Feature in the subsite without causing a memory leak. Which code segment should you use?
A. Dim featuresCollect As SPFeatureCollection = SPContext.Current.SiteFeatures featuresCollect.Add(New Guid(“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”), True)
B. Dim featuresCollect As SPFeatureCollection = SPContext.Current.WebFeatures featuresCollect.Add(New Guid(“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”), True)
C. Dim web As New SPSite(“http://www.contoso.com/hr”)
Dim featureCollect As SPFeatureCollection = web.Features
featureCollect.Add(New Guid(“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”), True)
D. Dim web As SPWeb = New SPSite(“http://www.contoso.com/hr”).OpenWeb()
Dim featureCollect As SPFeatureCollection = web.Features
featureCollect.Add(New Guid(“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”), True)
Answer: B
QUESTION 205
You are running a default installation of Microsoft Visual Studio 2010. You have a user control named Control.ascx. You need to convert the user control to a Web Part that will be hosted in a Microsoft SharePoint Server 2010 farm. The Web Part must be packaged as a sandboxed solution. What should you do?
A. Create a new Web Part and reuse the code from the existing MyControl.ascx file.
B. Import the user control into a new Visual Web Part and use the existing MyControl.ascx file.
C. Modify the SafeControls section of the web.config file.
D. Copy the Control.ascx file to the ControlTemplates folder.
Answer: A
QUESTION 206
You are running a default installation of Microsoft Visual Studio 2010. You have a Web Part named WebPart1. WebPart1 runs on a Microsoft Office SharePoint Server 2007 server. You need to ensure that WebPart1 can run as a sandboxed solution in Microsoft SharePoint Server 2010. What should you do?
A. Create a new Visual Web Part by using the code from WebPart1.
B. Create a new Web Part by using the code from WebPart1.
C. Create an ASCXfile for WebPart1, and then copy the file to the ISAPI folder.
D. Create an ASCXfile for WebPart1, and then copy the file to the CONTROLSTEMPLATES folder.
Answer: A
QUESTION 207
You are creating two Web Parts named WPMaster and WPDetails. You need to ensure that when an item is selected from WPMaster, the details of the item are displayed in WPDetails. This must occur without requiring WPDetails to retrieve the existing item from the data source. What should you implement in WPMaster?
A. IWebActionable
B. IWebPartTable
C. IListProvider
D. IWebPartRow
Answer: D
QUESTION 208
You develop a custom master page. You need to ensure that all pages that use the master page contain a specific image in the same location. Page developers must be able to change the image on individual pages without impacting other pages that use the same master page. What should you add to the master page?
A. a ContentPlaceHolder control
B. an HTML Div element
C. a Placeholder control
D. an Image control
Answer: A
QUESTION 209
You create custom code to import content to SharePoint sites. You create a custom site definition by using Microsoft Visual Studio 2010. You need to ensure that when a new site that uses the custom site definition is created, the custom code executes after the site is created. Which class should you add to the project?
A. SPEmailEventReceiver
B. SPWebProvisioningProvider
C. SPItemEventReceiver
D. SPChangeFile
Answer: B
Explanation:
MNEMONIC RULE: “new site created = SPWebProvisioningProvider”
Provides a handler for responding to Web site creation.
SPWebProvisioningProvider Class
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spwebprovisioningprovider.aspx
QUESTION 210
You create a custom site definition named DCS. You create a site provision handler for DCS. DCS contains a file named DCSTemplate.xsd that stores configuration data. You need to read the content of DCSTemplate.xsd in the site provision handler. Which property should you use?
A. SPSite.GetCustomWebTemplates(1033)[“DCS”].ProvisionClass
B. SPWebApplication.DataRetrievalProvider
C. SPWebProvisioningProperties.Data
D. SPWebProvisioningProperties.Web.DataRetrievalServicesSettings
Answer: C
Explanation:
MNEMONIC RULE: “configuration data = SPWebProvisioningProperties.Data”
Gets custom data that is used in creating the Web site.
SPWebProvisioningProperties.Data Property
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spwebprovisioningproperties.data.aspx
http://www.passleader.com/70-573.html
QUESTION 211
You create a custom Web Part. You need to verify whether the Web Part causes any memory leaks. Which tool should you use?
A. SPDisposeCheck.exe
B. SPMetal.exe
C. Wca.exe
D. WinDbg.exe
Answer: A
Explanation:
MNEMONIC RULE: “memory leaks = SPDisposeCheck”
SPDisposeCheck is a tool that helps developers and administrators check custom SharePoint solutions thatuse the SharePoint Object Model helping measure against known Microsoft dispose best practices. This toolmay not show all memory leaks in your code and may produce false positives which need further review bysubject matter experts.
SharePoint Dispose Checker Tool
http://archive.msdn.microsoft.com/SPDisposeCheck
QUESTION 212
You update a solution validator. You need to ensure that all SharePoint solutions are validated the next time the solutions are executed. What should you do?
A. Modify the Guid attribute of the solution validator.
B. Deactivate and activate all of the installed solutions.
C. Modify the Signature property of the solution validator.
D. In the Feature that deploys the solution validator, modify the Version attribute of the Feature element.
Answer: C
Explanation:
MNEMONIC RULE: “signature solution validator”
Gets or sets the version number and state hash of a solution validator.
SPSolutionValidator.Signature Property
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.usercode.spsolutionvalidator.signature.aspx
QUESTION 213
You have a SharePoint site collection that contains 100 subsites. You plan to create a Web Part. The Web Part will be deployed to each subsite. You need to ensure that the Web Part retrieves all of the files in the root directory of the current subsite. You write the following code segment. (Line numbers are included for reference only.)
01 Dim site As SPSite = SPContext.Current.Site
02 Dim web As SPWeb = SPContext.Current.Web
03
Which code segment should you add at line 03?
A. site.AllWebs[1].Files
B. Site.RootWeb.Lists[0].Items
C. web.Files
D. web.RootFolder.SubFolders[0].Files web.Users.Add(currentUser.LoginName, currentUser.Email, currentUser.Name, “”)
Answer: C
Explanation:
MNEMONIC RULE: “current subsite = web = web.Files”
Gets the collection of all files in the root directory of the website.
SPWeb.Files Property
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.files.aspx
QUESTION 214
You have a SharePoint farm that has more than 100 custom Features. You upgrade several Features in the farm. You need to ensure that the site collection uses the most up-to-date versions of the Features. Only Features that require an upgrade must be evaluated. Which code segment should you use?
A. Dim webServices As New SPWebServiceCollection(SPFarm.Local)
For Each myWebService1 As SPWebService In webServices
Dim queryResults As SPFeatureQueryResultCollection = myWebService1.QueryFeatures(SPFeatureScope.Site, True)
Dim featureEnumerator As IEnumerator(Of SPFeature) = queryResults.GetEnumerator()
While featureEnumerator.MoveNext()
Dim feature As SPFeature =
featureEnumerator.Current feature.Upgrade(False)
End While
Next
B. Dim webServices As New SPWebServiceCollection(SPFarm.Local)
For Each myWebService1 As SPWebService In webServices
Dim queryResults As SPFeatureQueryResultCollection = myWebService1.QueryFeatures(SPFeatureScope.Web, True)
Dim featureEnumerator As IEnumerator(Of SPFeature) =
queryResults.GetEnumerator()
While featureEnumerator.MoveNext()
Dim feature As SPFeature = featureEnumerator.Current
feature.Upgrade(False)
End While
Next
C. Dim site As SPSite = SPContext.Current.Site
Dim allFeatures As SPFeatureCollection = site.Features
For Each currentFeature As SPFeature In allFeatures
currentFeature.Upgrade(True)
Next
D. Dim web As SPWeb = SPContext.Current.Web
Dim allFeatures As SPFeatureCollection = web.Features
For Each currentFeature As SPFeature In allFeatures
currentFeature.Upgrade(True)
Next
Answer: A
Explanation:
MNEMONIC RULE: “large chunk of code, SPFeatureScope.Site”
Since we are working with the site collection, we need to use SPFeatureScope.Site, not SPFeatureScope.Web.
needsUpgrade (Boolean): if true, only features that need to be upgraded are included. If false, only featuresthat do not need to be upgraded are included.
SPSite.QueryFeatures Method (Guid, Boolean)
http://msdn.microsoft.com/en-us/library/ee545763.aspx
QUESTION 215
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.)
01 Protected 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?
A. curRibbon.Enabled = true
B. curRibbon.MakeRTEContextualTabsAvailable(“SP.Ribbon.ContextualTab “)
C. curRibbon.MakeTabAvailable(“SP.Ribbon.ContextualTab”)
D. curRibbon.Visible = true
Answer: C
Explanation:
MNEMONIC RULE: “MakeTabAvailable”
Ribbon.MakeTabAvailable Method (String)
http://msdn.microsoft.com/en-us/library/ff409505.aspx
QUESTION 216
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.)
01 Public Overloads Overrides Sub ItemAdding(ByVal properties As SPItemEventProperties)
02 If properties.ListItem(“Title”).ToString().Contains(“secret”) Then
03
04 End If
05 End 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?
A. properties.Cancel = false
B. properties.Cancel = true
C. properties.Status = SPEventReceiverStatus.Continue
D. Exit Sub
Answer: B
QUESTION 217
You create a client application that remotely calls the Business Connectivity Services (BCS) object model. You need to create the context that will be used to request a cache refresh. Which code segment should you use?
A. Dim cCtx As BdcService = SPFarm.Local.Services.GetValue(Of BdcService)(String.Empty)
B. Dim cCtx As New ClientContext(String.Empty)
C. Dim cCtx As New RemoteOfflineRuntime()
D. Dim cCtx As New RemoteSharedFileBackedMetadataCatalog()
Answer: C
QUESTION 218
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?
A. Change line 04 to the following code segment.
Select Not announce.Expires.HasValue
B. Change line 04 to the following code segment.
Select announce.Expires.Value.CompareTo(DateTime.Now) >= 0
C. Add the following line of code at line 03.
Where announce.Expires.Value.CompareTo(DateTime.Now) >= 0 _
D. Add the following line of code at line 03.
Order By announce.Expires.Value.CompareTo(DateTime.Now) >= 0 _
Answer: C
QUESTION 219
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.)
01 Dim context As New ClientContext(“http://intranet”)
02
03 Dim site As Web = context.Web
04 context.Load(site)
05
06 textBoxTitle.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?
A. Add the following line of code at line 02.
context.ExecuteQuery()
B. Add the following line of code at line 02.
context.ValidateOnClient = true
C. Add the following line of code at line 05.
context.ExecuteQuery()
D. Add the following line of code at line 05.
context.ValidateOnClient = true
Answer: C
QUESTION 220
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?
A. <FieldRef Name=’FileDirRef’/>
B. <FieldRef Name=’FileLeafRef’/>
C. <FieldRef Name=’FileRef’/>
D. <FieldRef Name=’File_x0020_Type’/>
Answer: B