Microsoft
70-573 · Question #96
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)…
The correct answer is D. 07 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl. See the full explanation below for the reasoning.
Question
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?
Options
- A07 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl ;
- B07 properties. RedirectUrl = "/ layouts/custoroErrorPage. aspx ";
- C07 properties.ErrorMessage = "<Pedirect URL = */_layouts/ customErrorPage.aspx' />";
- D07 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl ;
How the community answered
(54 responses)- A2% (1)
- B6% (3)
- C11% (6)
- D81% (44)
Community Discussion
No community discussion yet for this question.