nerdexam
Microsoft

70-573 · Question #216

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.) 01Public Overloads Overrides Sub…

The correct answer is B. properties.Cancel = true. See the full explanation below for the reasoning.

Question

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.) 01Public Overloads Overrides Sub ItemAdding(ByVal properties As SPItemEventProperties) 02If properties.ListItem("Title").ToString().Contains("secret") Then 03 04End If 05End Sub 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 03?

Options

  • Aproperties.Cancel = false
  • Bproperties.Cancel = true
  • Cproperties.Status = SPEventReceiverStatus.Continue
  • DExit Sub

How the community answered

(17 responses)
  • B
    82% (14)
  • C
    6% (1)
  • D
    12% (2)

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice