[Pass Ensure VCE Dumps] Accurate 285q 70-573 Exam Questions With VCE Dumps Offered By PassLeader (21-40)

PassLeader supply the newest 285q 70-573 vce dumps and 70-573 pdf dumps, the latest 285q 70-573 braindumps are the best dumps with all new 70-573 exam questions, it will let you passing 70-573 exam easily and quickly. Now going to passleader.com and download the valid 70-573 exam dumps and FREE VCE PLAYER!

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 21
You create a custom Web Part. You need to ensure that a custom property is visible in Edit mode. Which attribute should you set in the Web Part?

A.    WebDisplayName
B.    WebBrowsable
C.    Personalizable
D.    WebCategoryName

Answer: B
Explanation:
MNEMONIC RULE: "Web Part is visible = WebBrowsable"
The WebBrowsable attribute specifies that the decorated property should appear in the editor component ofthe web part. It only allows the end user to modify the property and does nothing about persistence. WebBrowsable will make the property appear in the ToolPane or EditorPart of the WebPart.
WebBrowsable vs Personalizable in Web Parts
http://stackoverflow.com/questions/4362234/webbrowsable-vs-personalizable-in-web-parts

QUESTION 22
You plan to create two Web Parts named Products and ProductDetails. You create an interface that contains the following code segment.
Public interface Interface1
{
String ProductId { get; }
}
You need to ensure that the Products Web Part sends Productid to the ProductDetails Web Part. You must achieve this goal by using the ASP.NET Web Part connection framework. What should you do?

A.    Implement Interface1 in the Products Web Part.
B.    Implement Interface1 in the ProductDetails Web Part.
C.    Add a private set-accessor-declaration to the Productid property.
D.    Add a protected set-accessor-declaration to the Productid property.

Answer: A
Explanation:
MNEMONIC RULE: "Implement Interface1 in Products Web"
Products Web Part sends ProductId; therefore, Products Web Part is the provider Web Part.
Walkthrough: Creating Connectable Web Parts in SharePoint Foundation
http://msdn.microsoft.com/en-us/library/ms469765.aspx
SharePoint 2010 Provider Consumer Web Parts
http://johanolivier.blogspot.com/2010/08/sharepoint-2010-provider-consumer-web.html

QUESTION 23
You create a user control named MySearch.ascx. You plan to change the native search control in SharePoint to MySearch.ascx. You need to provide the site administrator with the ability to change the out-of-the-box search control to MySearch.ascx. What should you do?

A.    Override the search delegate control by using a Feature.
B.    Modify the <SafeControls> element in the web.config file.
C.    Configure the SearchBox.dwp in the Web Part gallery.
D.    Modify \14\TEMPLATE\FEATURES\SearchWebParts\SearchBox.dwp.

Answer: C

QUESTION 24
You create a custom Web Part. You need to create a class to log Web Part errors to the Unified Logging Service (ULS) logs. What should you use?

A.    the ILoggingProvider interface
B.    the SPPersistedObject class
C.    the SPDiagnosticsServiceBase class
D.    the ILogger interface

Answer: C
Explanation:
MNEMONIC RULE: "Unified Logging Service = SPDiagnosticsServiceBase"
Logging to ULS in SharePoint 2010
http://blog.mastykarz.nl/logging-uls-sharepoint-2010/

QUESTION 25
You have a custom Web Part that is deployed as a sandboxed solution. You need to ensure that the Web Part can access the local file system on a SharePoint server. You must minimize the amount of privileges assigned to the Web Part. What should you do?

A.    Deploy the Web Part to the Global Assembly Cache (GAC).
B.    Elevate the trust level to Full.
C.    Redeploy the Web Part as a farm solution.
D.    Elevate the trust level to WSS_Medium.

Answer: C
Explanation:
MNEMONIC RULE: "Redeploy"
Due to the heavy restrictions of sandboxed solutions, elevating the trust level is not an option, and neither isthe deployment of the Web Part to GAC. You can get broader permissions by using full-trust proxies, but it’s not an option in this question. 🙂

QUESTION 26
You have a custom Web Part. You need to create a custom user interface for modifying the Web Part properties. What should you do?

A.    Create a new Master Page. Implement the IControlBuilderAccessor interface.
B.    Create a new tool part for the custom Web Part.
C.    Modify the [ToolBox] attribute of the custom Web Part.
D.    Create a new Web Part. Implement the IControlBuilderAccessor interface.

Answer: B
Explanation:
MNEMONIC RULE: "Tool part for the Web Part"
What is a custom tool part? The Custom tool part is part of the web part infrastructure, that helps us to create a custom user interface forthe web part properties that goes beyond the capabilities of the default property pane.
When do we need a custom tool part? Let’s say, If we need to create a web part property of type dropdown, we need to create a custom tool part.This is not supported out-of-box in the web part framework. I’ve the similar requirement of creating a customweb part property of type drop-down.
Create Custom Tool Parts for SharePoint Web Parts
https://msmvps.com/blogs/sundar_narasiman/archive/2009/09/02/create-custom-tool-parts-for-sharepoint-webparts.aspx

QUESTION 27
You have a SharePoint site that uses a master page named Master1.master. You create a custom user control named MySearch.ascx. You need to change the default search box to MySearch.ascx. What should you do?

A.    Modify the SmallSearchInputBox control tag in the master page, and then configure the ControlId property.
B.    Modify the SmallSearchInputBox control tag in the master page, and then configure the ControlSrc property.
C.    Create a Web Part that uses MySearch.ascx. In the master page, add a control tag that references the .webpart file.
D.    Create a Visual Web Part that uses MySearch.ascx. In the master page, add a control tag that references the .webpart file.

Answer: B
Explanation:
MNEMONIC RULE: "ControlSrc"
Delegate Control (Control Templatization)
http://msdn.microsoft.com/en-us/library/ms463169.aspx

QUESTION 28
You create a Web Part that contains the following logging code. (Line numbers are included for reference only.)
01 SPWeb web = SPContext.Current.Web;
02 try
03 {
04
05 }
06 catch (Exception ex)
07 {
08
09 System.Diagnostics.EventLog.WriteEntry("WebPart Name", ("Exception Information: " + ex.Message), EventLogEntryType.Error);
10 }
You discover that line 09 causes an error. You need to resolve the error. What should you do?

A.    Run the code segment at line 09 inside a RunWithElevatedPrivileges delegate.
B.    Add the following code at line 08: if (web.CurrentUser.IsSiteAuditor == false)
C.    Add the following code at line 08: if (web.CurrentUser.IsSiteAdmin == false)
D.    Change line 09 to the following code segment: System.Diagnostics.EventLog.WriteEntry("WebPart Name", "Exception Information", EventLogEntryType.Error);

Answer: A
Explanation:
MNEMONIC RULE: "RunWithElevatedPrivileges"
SPSecurity.RunWithElevatedPrivileges Method
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx

QUESTION 29
You need to connect two Web Parts by using the IWebPartRow interface. Which method should you use?

A.    GetFieldValue
B.    Dataltem
C.    GetRowData
D.    GetTableData

Answer: C
Explanation:
MNEMONIC RULE: "iWebPartRow = GetRowData"
Returns the data for the row that is being used by the interface as the basis of a connection between twoWebPart controls.
IWebPartRow.GetRowData Method
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.iwebpartrow.getrowdata.aspx

QUESTION 30
You create a Web Part that programmatically updates the description of the current SharePoint site. The Web Part contains the following code segment. (Line numbers are included for reference only.)
01 SPSecurity.RunUithElevatedPrivileges (delegate()
02 {
03 SPSite currSite = SPConcext.Current.Site ;
04 SPUeb currUeb = SPContext.Current.Ueb ;
05 using (SPSite eSite = new SPSite ( currSite.ID ) )
06 {
07 using (SPWeb eWeb = eSite.OpenUeb ( currUeb.ID ) )
08 {
09 Web.AllowUnsafeUpdates = true;
10 currUeb.Description = "Test";
11 currUeb.Update ();
12 eUeb.AllowUnsafeUpdates = false;
13 }
14 }
15 }
16 };
Users report that they receive an Access Denied error message when they use the Web Part. You need to ensure that all users can use the Web Part to update the description of the current site. What should you do?

A.    Remove lines 10 and 11.
B.    Remove lines 09 and 12.
C.    Change lines 09 and 12 to use the currWeb variable.
D.    Change lines 10 and 11 to use the eWeb variable.

Answer: D


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

QUESTION 31
You have a SharePoint solution that contains a custom site column and a custom content type. You need to add the custom site column as a lookup field for the custom content type. What should you create?

A.    a Feature activation dependency
B.    a new module
C.    a new Feature event receiver
D.    a new SharePoint mapped folder

Answer: C
Explanation:
MNEMONIC RULE: "Feature event receiver"
Walkthrough: Add Feature Event Receivers
http://msdn.microsoft.com/en-us/library/ee231604.aspx

QUESTION 33
You need to delete the previous versions of all documents in a document library. The deleted versions of the documents must be retained in the SharePoint Recycle Bin. What should you do?

A.    For the document library, call the Delete method.
B.    For the document library, call the Recycle method.
C.    For each document, call the DeleteAll method of the Versions property.
D.    For each document, call the RecycleAll method of the Versions property.

Answer: D
Explanation:
MNEMONIC RULE: "all previous versions to Recycle Bin = RecycleAll of the Versions"
Recycles the version collection except for the current version.
SPListItemVersionCollection.RecycleAll Method
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemversioncollection.recycleall.aspx

QUESTION 34
You need to create a Web Part that displays all content created by a specific user. You write the following code segment. (Line numbers are included for reference only.)
01 privace void keywordQueryExecute (string searchAuthor )
02 {
03 KeywordQuery kRequest = new KeywordQuery ( ServerContexc.Current );
04
05 kPequest.QueryText = strQuery;
06 ResultTableCollection resultTbls = kRequest.Execute ();
07 }
Which code segment should you add at line 04?

A.    string strQuery – "SELECT Title, Rank, Write, Url FROM SCOPE()
WHERE docID – " + searchAuthor;
B.    string strQuery = "author:" + searchAuthor;
C.    string strQuery = "SELECT Title, Rank, Write, Url FROM SCOPE ()
WHERE author – " + searchAuthor;
D.    string strQuery * " doc ID:" + searchAuthor;

Answer: B
Explanation:
MNEMONIC RULE: "KeywordQuery =no SQL!"
Property Restriction Keyword Queries
http://msdn.microsoft.com/en-us/library/ff394509.aspx

QUESTION 35
You need to create a Web Part that adds a term set to the current SharePoint site collection’s term store. You write the following code segment. (Line numbers are included for reference only.)
01 TaxonomySession session = new TaxonomySession ( SPContext.Current..Site );
02 TermSet addedTerm = session.TermStores [O] .Groups
[" MyNewTermStore "] . CreateTermSet ( txtBoxTermSetToAdd.Text );
03
Which code segment should you add at line 03?

A.    addedTerm.TermStore.CommitAll ();
B.    addedTerm.Export ();
C.    SPContext.Current.Web.AllouUnsafeUpdates = true;
D.    SPContext.Current.Site.WebAppllcation.Update ();

Answer: A

QUESTION 36
You need to create a custom content type and specify the content type ID. What should you do?

A.    Call the Lists Web service.
B.    Create a custom Feature.
C.    Call the Webs Web service.
D.    Create a new module.

Answer: B
Explanation:
MNEMONIC RULE: "custom Feature for custom content type"
Create Custom Content Types in SharePoint 2010
http://msdn.microsoft.com/en-us/library/ff630942.aspx

QUESTION 37
You plan to create a custom Web Part that displays items from a custom SharePoint list named Project. You need to ensure that you can access the list by using strongly-typed objects in Microsoft Visual Studio 2010. What should you do first?

A.    Run ecmangen.exe.
B.    Run spmetal.exe.
C.    Edit the web.config file.
D.    Edit the Manifest.xml file.

Answer: B

QUESTION 38
You have a SharePoint site collection that contains 100 sites. Each site contains 100 lists. You need to retrieve all item titles from all lists. The data must be retrieved in the minimum amount of time. Which access method should you use?

A.    SPList.Items
B.    SPListltemCollection.GetDataTable
C.    SPSiteDataQuery
D.    ListData.svc

Answer: C
Explanation:
MNEMONIC RULE: "100 sites = SPSite"
The data must be retrieved in the minimum amount of time; therefore, SPSiteDataQuery SPSiteDataQuery Class
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx

QUESTION 39
You have a SharePoint site collection that has the URL http://contoso/sites/finance. 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.)
01 ClientContext cCtx = new ClientContext("http://contoso/sites/finance");
02 Web root = cCtx.Site.RootWeb;
03 cCtx.Load(root);
04 WebCreationInformation webInfo = 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 creates the site. Which code segment should you add at line 09?

A.    cCtx.Site.RootWeb.Update ();
B.    cCtx.ExecuteQuery ();
C.    root.Context.Dispose ();
D.    coot.Update ();

Answer: B
Explanation:
MNEMONIC RULE: "Execute your Query"
Executes the current set of data retrieval queries and method invocations.
How to: Work with Web Sites
http://msdn.microsoft.com/en-us/library/ee535521.aspx

QUESTION 40
You create a Web Part that queries a list. The Web Part contains the following code segment. (Line numbers are included for reference only.)
01 protected override void Render( HtmlTextWriter writer)
02 {
03 SPUserToken spInToken = GetTheContext ( SPContext.Current.Site );
04 using (SPSite aSite = nera SPSite ( curSiteCtx.ID , spInToken ) )
05 {
06
07 }
08 }
09 private SPUserToken GetTheContext ( SPSite nUeb )
10 <
11 nWeb.CatchAccessDeniedException = false;
12 SPUserToken spToken = null;
13 try
14 {
15 spToken = nWeb.SystemAccount.UserToken;
16 }
17 catch ( UnauthorizedAccessException )
18 {
19
20 }
21 return spToken;
22 }
You need to ensure that users without permissions to the list can view the contents of the list from the Web Part. Which code segment should you add at line 19?

A.    SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite eSite = new SPSite(nWeb.ID))
{
spToken = nWeb.SystemAccount.UserToken;
}
}
B.    SPSecurity.RunWithElevatedPrivileges(delegate()
{
Practice Test
using (SPSite eSite = new SPSite(nWeb.ID))
{
spToken = SPContext.Current.Web.CurrentUser.UserToken; }
}
C.    spToken = nWeb.RootWeb.AllUsers[SPContext.Current.Web.Name].UserToken;
D.    spToken = nWeb.RootWeb.AllUsers[WindowsIdentity.GetCurrent().Name].UserToken;

Answer: A
Explanation:
MNEMONIC RULE: "UnauthorizedAccessException = RunWithElevatedPrivileges = SystemAccount"
Answer A is the only one that will give us a SystemAccount token from within RunWithElevatedPrivilegesstatement. That’s what we are trying to get in case UnauthorizedAccessException occurs.


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

         

Welcome To Visit PassLeader