nerdexam
Microsoft

70-573 · Question #264

70-573 Question #264: Real Exam Question with Answer & Explanation

The correct answer is D. 04 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl;. MNEMONIC RULE: "CancelWithRedirectUrl, RedirectUrl" Redirect to URL in SharePoint Foundation 2010 Event Receiver and Custom Error Page

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

  • A04 properties.ReceiverData = "/_layouts/customErrorPage.aspx";
  • B04 properties.RedirectUrl = "/_layouts/customErrorPage.aspx";
  • C04 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl;
  • D04 properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl;

Explanation

MNEMONIC RULE: "CancelWithRedirectUrl, RedirectUrl" Redirect to URL in SharePoint Foundation 2010 Event Receiver and Custom Error Page

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice