PrepAway - Latest Free Exam Questions & Answers

Category: 70-573

Exam 70-573: TS: Microsoft SharePoint 2010, Application Development

What should you do?

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 void Page_Load(object sender, EventArgs e)
02 {
03 SPSite site = null;
04 try
05 {
06 SPSite site = new SPSite(“http://www.contoso.com/default.aspx”);
07 SPWeb web = site.OpenWeb();
08
09 …
10 }
11 catch
12 {
13
14 }
15 finally
16 {
17
18 }
19 }

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?

Which code segment should you add at line 04?

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 System.Web.UI.WebControls.TextBox txtBoxTermSetToAdd = new System.Web.UI.WebControls.TextBox();
02 TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
03 TermSet addedTerm = session.TermStores[0].Groups[“MyNewTermStore”].CreateTermSet(txtBoxTermSetToAdd.Text);
04

Which code segment should you add at line 04?

What should you do?

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 void Page_Load(object sender, EventArgs e)
02 {
03 SPSite site = null;
04 try
05 {
06 SPSite site = new SPSite(“http://www.contoso.com/default.aspx”);
07 SPWeb web = site.OpenWeb();
08
09 …
10 }
11 catch
12 {
13
14 }
15 finally
16 {
17
18 }
19 }

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?

Which property tag should you add at line 07?

You develop a new publishing page layout named MyPage.aspx for a SharePoint site.

You create an Elements.xml file.

Elements.xml contains the following code segment. (Line numbers are included for reference only.)

01 <File Url=”mypage.aspx” Type=”GhostableInLibrary” IgnoreIfAlreadyExists=”TRUE”>
02 <Property Name=”Title” Value=”MyPage” />
03 <Property Name=”ContentType” Value=”$Resources:cmscore,contenttype_pagelayout_name;” />
04 <Property Name=”PublishingAssociatedContentType” Value=”; 05 #$Resources:cmscore,contenttype_page_name;;
06 #0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811;#”/>
07
08 </File>

You need to prevent users from creating pages based on the page layout.

Which property tag should you add at line 07?


Page 1 of 1812345...10...Last »