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

You have the following event receiver. (Line numbers are included for reference only.) 01Public
Overloads Overrides Sub FieldDeleting (ByVal properties As SPListEventProperties) 02
MyBase.FieldDeleting(properties) 03 If properties.FieldName = “Status” Then 04 05 06 End If
07End Sub 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 04 and 05?

You have the following event receiver. (Line numbers are included for reference only.) 01Public
Overloads Overrides Sub FieldDeleting (ByVal properties As SPListEventProperties) 02
MyBase.FieldDeleting(properties) 03 If properties.FieldName = “Status” Then 04 05 06 End If
07End Sub 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 04 and 05?

A.
04properties.ReceiverData = “/_layouts/customErrorPage.aspx” 05properties.Cancel = True

B.
04properties.RedirectUrl = “/_layouts/customErrorPage.aspx” 05properties.Cancel = True

C.
04properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl
05properties.ReceiverData = “/_layouts/customErrorPage.aspx”

D.
04properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl 05properties.RedirectUrl
= “/_layouts/customErrorPage.aspx”



Leave a Reply 0

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