PrepAway - Latest Free Exam Questions & Answers

Category: 70-573

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

Which code segment should you add at line 05?

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 override void ItemAdding(SPItemEventProperties properties)
02 {
03 if (properties.ListItem[“Title”].ToString().Contains(“secret”))
04 {
05
06 }
07 }

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 05?

Which code segments should you add at lines 03, 04, 05, and 06?

You are creating an event receiver. The event receiver will have a field named Title and a field named Priority.

You write the following code segment for the event receiver. (Line numbers are included for reference only.)

01 public override void ItemUpdating(SPItemEventProperties prop)
02 {
02 base.ItemUpdating(prop);
03
04
05
06
07 }

You need to ensure that when the Title field is changed to include the word IMPORTANT, the Priority field is set to URGENT.

Which code segments should you add at lines 03, 04, 05, and 06?

Which code segments should you add at lines 07 and 08?

You have the following event receiver. (Line numbers are included for reference only.)

01 public override void FieldDeleting(SPListEventProperties properties)
02 {
03 base.FieldDeleting(properties);
04
05 if (properties.FieldName == “Status”)
06 {
07
08
09 }
10 }

You need to cancel the operation and redirect the user to a custom error page if the name of the deleted field is Status.

Which code segments should you add at lines 07 and 08?

What should you do?

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 SPWebService cs = SPWebService.ContentService;
02 cs.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.On;

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?

What should you do?

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?


Page 11 of 18« First...910111213...Last »