PrepAway - Latest Free Exam Questions & Answers

Category: 70-573 (v.1)

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

What should you do?

You create a Web Part that takes three values from three text boxes and creates a new
SharePoint site when you click a button named CreateNewSite. The Web Part contains the
following code segment. protected void CreateNewSite_Click(object sender, EventArgs e) {
SPSite site = SPContext.Current.Site; SPWeb web = site.AllWebs.Add(SiteNameTextBox.Text,
SiteTitleTextBox.Text, SiteDescriptionTextBox.Text, 0, SPWebTemplate.WebTemplateSTS, false,
false); } You test the Web Part and it works properly. When another user attempts to use the Web
Part to create a new site, he receives the following error message: “Error: Access Denied.” You

need to ensure that users can use the Web Part to create new sites. What should you do?

Which code segment should you add to the console application?

You have a custom theme named MyTheme . The theme is defined in a file named
MyTheme.thmx . You have a console application that contains the following code segment. (Line
numbers are included for reference only.) 101 using ( SPSite sice = new SPSite ( “http://intranet”
}} 02 { 03 SPWeb web – site.OpenWeb (); 01 05 } You need to programmatically apply the theme
to a SharePoint site. Which code segment should you add to the console application?

You need to ensure that the code opens the dialog box

You are creating an application page that will open a dialog box. The application page uses a
custom master page. You write the following code segment. (Line numbers are included for
reference only.) 01 < script type=”text/javascript” > 02 function DialogCallback ( dialogResult,
retumValue ){> 03 function OpenEditDialog (id){ 04 var options = { url:” http://intranet/Jayouts
/MsgToShow.aspx, width: 300, 05 height: 300, 06 dialogReturnValueCallback : DialogCallback 07
}; 08 SP.UI.ModalDialog.showModalDialog (options); 09 } 10 < /script > You need to ensure that
the code opens the dialog box. What should you do?

Which control should you include in Form1?

You created a custom ASPX page that updates a list. The page is deployed to the Jayouts folder.
The page contains the following code segment. 01 < form id=” Forml” runat =” Server” > 02 < asp:
Button id=” btnUpdate ” runat =” server” Text=” Update” ></asp : Button > 03 </form > A user
attempts to update the list by using the p age and receives the following error message: “The
security validation for this page is invalid”. You need to prevent the error from occurring. Which
control should you include in Form1?

You need to ensure that the application activates the Developer Dashboard

You plan to activate the Developer Dashboard. You create a command line application that
contains the following code segment. (Line numbers are included for reference only.) 01
SPUebService cs = SPHebService.ContentServi.ee ; 02
cs.DeveloperDashfooardSettings.DisplayLevel = SPDeveloperDashboardLevel.On ; 03 You
execute the application and discover that the Developer Dashboard fails to appear. You need to
ensure that the application activates the Developer Dashboard. What should you do?


Page 2 of 2412345...1020...Last »