[Pass Ensure VCE Dumps] PassLeader 285q 70-573 VCE Braindumps For Free Download (221-240)

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 221
You have a document library named MyDocs. MyDocs has a column named Column1. Column1 is a required column. You discover that many documents are checked out because users fail to enter a value for Column1. You need to create a Web Part to delete the documents. Which code segment should you include in the Web Part?

A.    For Each file As SPCheckedOutFile In
CType(SPContext.Current.Web.Lists(“MyDocs”),SPDocumentLibrary).
CheckedOutFiles file.Delete
Next
B.    For Each file As SPItem In SPContext.Current.Web.Lists(“MyDocs”).
Items If (file(“CheckOutStatus”) = “CheckOut”) Then
file.Delete
End If
Next
C.    For Each file As SPListItem In
CType(SPContext.Current.Web.Lists(“MyDocs”),SPDocumentLibrary).
Items If (file(“CheckOutStatus”) = “CheckOut”) Then
file.Delete
End If
Next
D.    For Each file As SPCheckedOutFile In
CType(SPContext.Current.Web.Lists(“MyDocs”),SPDocumentLibrary).
CheckedOutFiles file.TakeOverCheckOut
Next

Answer: A

QUESTION 222
You need to create a Web Part that displays all social tags entered by users. Which code segment should you use?

A.    Dim session As New TaxonomySession(SPContext.Current.Site)
Dim socialTags As TermSet = session.DefaultKeywordsTermStore.SystemGroup.TermSets(“Keywords”)
B.    Dim session As New TaxonomySession(SPContext.Current.Site)
Dim socialTags As TermSet = session.DefaultKeywordsTermStore.SystemGroup.TermSets(“Tags”)
C.    Dim socialTags As TermSet = DirectCast
(SPContext.Current.Site.WebApplication.Properties(“Tags”), TermSet)
D.    Dim socialTags As TermSet = DirectCast
(SPContext.Current.Web.AllProperties(“Keywords”), TermSet)

Answer: A

QUESTION 223
You have a list named Projects that contains a column named ClassificationMetadata. 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.)
01 For Each currentItem As SPListItem In SPContext.Current.Web.Lists(“Projects”).Items
02
03 Next
Which code segment should you add at line 02?

A.    currentItem(“ClassificationMetadata”) = “NA”
B.    currentItem.Fields(“ClassificationMetadata”).DefaultFormula = “NA”
C.    currentItem.Fields(“ClassificationMetadata”).DefaultValue = “NA”
D.    currentItem(“Value”) = “ClassificationMetadata/NA”

Answer: A

QUESTION 224
You have a Web application that contains the following code segment.
Private Sub CreatingSPSite()
Dim siteCollection As SPSite = Nothing
Try
siteCollection = New SPSite(“http://contoso.com”)
Finally
End Try
End Sub
You need to prevent the code segment from causing a memory leak. Which code segment should you add?

A.    if (siteCollection != null)
{
siteCollection.Close();
}
B.    if (siteCollection != null)
{
siteCollection.Dispose();
}
C.    siteCollection = null;
D.    siteCollection.WriteLocked = false;

Answer: B
Explanation:
MNEMONIC RULE: “Dispose of memory leak”
Difference between Close() and Dispose() Method
http://dotnetguts.blogspot.com/2007/06/difference-between-close-and-dispose.html

QUESTION 225
You deploy a custom Web Part named WebPart1 to a SharePoint site. WebPart1 contains the following code segment. (Line numbers are included for reference only.)
01 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
02 Dim site As SPSite = Nothing
03 Try
04 Dim site As New SPSite(“http://www.contoso.com/default.aspx”)
05 Dim web As SPWeb = site.OpenWeb()
06
07 …
08 Catch
09
10 Finally
11
12 End Try
13 End Sub
After you deploy WebPart1, users report that the pages on the site load slowly. You retract WebPart1 from the site. Users report that the pages on the site load without delay. You need to modify the code in WebPart1 to prevent the pages from loading slowly. What should you do?

A.    Add the following line of code at line 06.
site.ReadOnly = True
B.    Add the following line of code at line 09.
site.Dispose()
C.    Add the following line of code at line 11.
site.Dispose()
D.    Add the following line of code at line 11.
site.ReadOnly = True

Answer: C

QUESTION 226
You have a Web Part that contains the following code segment. (Line numbers are included for reference only.)
01 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
02 Dim site As New SPSite(“http://www.contoso.com/default.aspx”)
03 If True Then
04 Dim web As SPWeb = site.OpenWeb()
05
06 End If
07 End Sub
You deploy the Web Part to a SharePoint site. After you deploy the Web Part, users report that the site loads slowly. You need to modify the Web Part to prevent the site from loading slowly. What should you do?

A.    Add the following line of code at line 05.
web.Close()
B.    Add the following line of code at line 05.
web.Dispose()
C.    Add the following line of code at line 05.
site.Close()
D.    Change line 02 to the following code segment.
Using site As New SPSite(“http://www.contoso.com/default.aspx”)

Answer: D

QUESTION 227
You create an event receiver. The ItemAdded method for the event receiver contains the following code segment. (Line numbers are included for reference only.)
01 Dim recWeb As SPWeb = properties.Web
02 Using siteCollection As New SPSite(“http://site1/hr”)
03 Using web As SPWeb = siteCollection.OpenWeb()
04 Dim oWeb As PublishingWeb = PublishingWeb.GetPublishingWeb(web)
05 Dim pubWebs As PublishingWebCollection = oWeb.GetPublishingWebs()
06 For Each iWeb As PublishingWeb In pubWebs
07 Try
08 Dim page As SPFile = web.GetFile(“/Pages/default.aspx”)
09 Dim wpManager As SPLimitedWebPartManager = page.GetLimitedWebPartManager(PersonalizationScope.[Shared])
10 Finally
11 If iWeb IsNot Nothing Then
12 iWeb.Close()
13 End If
14 End Try
15 Next
16 End Using
17 End Using
You need to prevent the event receiver from causing memory leaks. Which object should you dispose of?

A.    oWeb at line 04
B.    recWeb at line 01
C.    wpManager at line 09
D.    wpManager.Web at line 09

Answer: D

QUESTION 228
You need to add a modal dialog box to a SharePoint application. What should you use?

A.    the Core.js JavaScript
B.    the Microsoft.SharePoint assembly
C.    the Microsoft.SharePoint.Client assembly
D.    the SP.js JavaScript

Answer: D
Explanation:
MNEMONIC RULE: “SP.js”
SP.UI namespace is defined in SP.Core.js, SP.js, SP.UI.Dialog.js files. ModalDialog is a part of SP.UInamespace.
JavaScript Class Library
http://msdn.microsoft.com/en-us/library/ee538253.aspx

QUESTION 229
You plan to add a custom tab to the Ribbon in a SharePoint Web application. You create a custom Feature that contains an Elements.xml file. You need to ensure that the custom tab only appears in the document libraries of the Web application. Which code segment should you add to the Custom Action node of the Elements.xml file?

A.    Location=”DocumentLibrary”
B.    RegistrationId=”101″
C.    RegistrationType=”List”
D.    ShowInLists=”false”

Answer: B
Explanation:
MNEMONIC RULE: “document libraries 101”
SharePoint: RegistrationId List Template Type IDs
http://techtrainingnotes.blogspot.com/2008/01/sharepoint-registrationid-list-template.html
Work with the SharePoint 2010 Ribbon User Interface
http://msdn.microsoft.com/en-us/library/ff630938.aspx

QUESTION 230
You have one Web application that contains several SharePoint site collections. You need to create a Feature that adds a custom button to the Documents tab on the Ribbon of one site collection only. What should you do?

A.    Create a new Feature.
In a new <CommandUIDefinition> node, specify the location of Ribbon.Tabs._children.
B.    Create a new Feature.
In a new <CommandUIDefinition> node, specify the location of Ribbon.Documents.Manage.Controls._children.
C.    Modify the CMDUI.xml file.
In a new <CommandUIDefinition> node, specify the location of Ribbon.Tabs._children.
D.    Modify the CMDUI.xml file.
In a new <CommandUIDefinition> node, specify the location of Ribbon.Documents.Manage.Controls._children.

Answer: B


http://www.passleader.com/70-573.html

QUESTION 231
You create a Feature. You need remove the link to the Site Content Type page from the Site Settings page by using the Feature. Which element should you use in the Feature?

A.    ContentType
B.    ContentTypeBinding
C.    HideCustomAction
D.    Module

Answer: C
Explanation:
MNEMONIC RULE: “remove = HideCustomAction”
Use the HideCustomAction element to hide an existing action that is implemented by default within theinfrastructure of Microsoft SharePoint Foundation Features, or within another custom action.
<HideCustomAction
GroupId = “Text”
HideActionId = “Text”
Id = “Text”
Location = “Text”>
</HideCustomAction>
HideCustomAction Element
http://msdn.microsoft.com/en-us/library/ms414790.aspx

QUESTION 232
You have a custom master page named MyApplication.master. You need to apply MyApplication.master to only a custom application page in a SharePoint site. You must achieve the goal by using the minimum amount of effort. What should you do?

A.    Add a custom HTTP module to the Web application that modifies the master page.
B.    Add a custom HTTP module to the Web application that modifies the custom application page.
C.    Set the MasterPageFile attribute to ~/_layouts/MyApplication.master in the @Page directive of the customapplication page.
D.    Rename the custom application page as application.master and overwrite the default application.master page in the 14\TEMPLATE\LAYOUTS folder.

Answer: C
Explanation:
MNEMONIC RULE: “custom master page = MasterPageFile”
Using a Page Specific Master Page in SharePoint 2010
http://kjellsj.blogspot.com/2010/07/using-page-specific-master-page-in.html

QUESTION 234
You need to create a Web control that displays HTML content during the last stage of the page processing lifecycle. Which method should you override in the Web control?

A.    LoadControlState
B.    Render
C.    SaveViewState
D.    SetDesignModeState

Answer: B
Explanation:
MNEMONIC RULE: “Render”
Render
This is not an event; instead, at this stage of processing, the Page object calls this method on each control. AllASP.NET Web server controls have a Render method that writes out the control’s markup to send to thebrowser. If you create a custom control, you typically override this method to output the control’s markup.
ASP.NET Page Life Cycle Overview
http://msdn.microsoft.com/en-us/library/ms178472.aspx

QUESTION 235
You need to create a Web control that displays an ASCX control. Which event should you use?

A.    CreateChildControls
B.    LoadControlState
C.    SaveViewState
D.    SetDesignModeState

Answer: A
Explanation:
MNEMONIC RULE: “display ASCX control = CreateChildControl”
BaseFieldControl.CreateChildControls Method
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.basefieldcontrol.createchildcontrols.aspx

QUESTION 236
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 SharePoint Server 2010. What should you do?

A.    Create a new Web Part by using the code from WebPart1.
B.    Create a new Visual Web Part by using the code from WebPart1.
C.    Create an ASCX file for WebPart1, and then copy the file to the ISAPI folder.
D.    Create an ASCX file for WebPart1, and then copy the file to the CONTROLSTEMPLATES folder.

Answer: A
Explanation:
MNEMONIC RULE: “new Web Part”
Since sandboxed solutions have been introduced only with SharePoint 2010, your only option is to use theMOSS 2007 Web Part source code and create a new sandboxed Web Part.

QUESTION 237
You need to convert a user control named Control.ascx to a SharePoint Web Part. The Web Part must be packaged as a user solution. What should you do?

A.    Modify the SafeControls section of the web.config file.
B.    Copy the Control.ascx file to the ControlTemplates folder.
C.    Create a new Visual Web Part and use the existing MyControl.ascx file.
D.    Create a new Web Part and reuse the code from the MyControl.ascx file.

Answer: D
Explanation:
MNEMONIC RULE: “Create a new Web Part”
Since you already have a user control, you don’t need to create a Visual Web Part (by dragging-and-droppinguser controls from the Toolbox).

QUESTION 238
You plan to create a Web Part for a SharePoint site. You need to ensure that the Web Part can send data to other Web Parts in the site. What should you do?

A.    Implement the IAlertNotifyHandler interface.
B.    Implement the IAlertUpdateHandler interface.
C.    Create a custom interface that uses the WebBrowsable and the WebPartStorage attributes.
D.    Create a custom interface that uses the ConnectionProvider and ConnectionConsumer attributes.

Answer: D
Explanation:
MNEMONIC RULE: “send data = Provider/Consumer”
Connect Web Parts in SharePoint 2010
http://msdn.microsoft.com/en-us/library/ff597538.aspx

QUESTION 239
You create a SharePoint farm solution that contains a Web Part. You need to debug the Web Part by using Microsoft Visual Studio 2010. To which process should you attach the debugger?

A.    owstimer.exe
B.    spucworkerprocess.exe
C.    spucworkerprocessproxy.exe
D.    w3wp.exe

Answer: B
Explanation:
MNEMONIC RULE: “Sandbox worker needs no proxy”
To provide additional protection, the solution’s assembly is not loaded into the main IIS process (w3wp.exe). Instead, it is loaded into a separate process (SPUCWorkerProcess.exe).
Sandboxed Solution Considerations
http://msdn.microsoft.com/en-us/library/ee231562.aspx
If the project type lets you change the Sandboxed Solution property and its value is set to true, then thedebugger attaches to a different process (SPUCWorkerProcess.exe).
Debugging SharePoint Solutions
http://msdn.microsoft.com/en-us/library/ee231550.aspx

QUESTION 240
You create and deploy a custom Web Part. You add the Web Part to a page and receive a run-time error. You need to display the detailed information of the error on the page. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.    In the web.config file, set CallStack=”True”.
B.    In the web.config file, set customErrors=”RemoteOnly”.
C.    In the registry, set the EnableDebug value to 1.
D.    In the registry, set the DisableLoopbackCheck value to 1.

Answer: AB
Explanation:
MNEMONIC RULE: “Check all with web.config”
Turning off custom errors in _layouts Web.Config for debugging mode in SharePoint 2010
http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12


http://www.passleader.com/70-573.html