Which code segment should you add at line 03?

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?

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?

A.
properties.Status = SPEventReceiverStatus.Continue

B.
Exit Sub

C.
properties.Cancel = false

D.
properties.Cancel = true

Explanation:



Leave a Reply 0

Your email address will not be published. Required fields are marked *