SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

ByPass Error Page while canceling the event in Event Handler

          Actually, till some time back, i was searching for a way to bypass the error page, while canceling the event in event handler. In one of our application, when user deletes a item, event handler should cancel event, set a different status (so, that item will not processed in the application anymore). And user should not get the error page, according to the user, item is deleted.

         One of my friend, gave the solution in minutes. Though many of you might already know this, but i think it is worth putting in a blog.  Here is the simple code, which helps us doing that,

                       properties.Cancel = true;

                       properties.Status = SPEventReceiverStatus.CancelNoError;

  That's it, so simple. As most you might know that it works only in synchronous event.

Satheesh palaniswamy

    


Posted 08-28-2007 11:37 PM by Satheesh

Comments

Oz Ortiz wrote re: ByPass Error Page while canceling the event in Event Handler
on 09-06-2007 3:09 PM

That's perfect!  I'm glad you posted this because I didn't know about it.  Thanks.

Jean Bujold wrote re: ByPass Error Page while canceling the event in Event Handler
on 12-08-2008 7:59 PM

When I try to use these two lines of code, I still get the error message. Would you know why?

Santa wrote re: ByPass Error Page while canceling the event in Event Handler
on 01-22-2009 8:18 PM

Fantastic!!  I am sure there many people helped by this. It saved me...

Thank you.

elinore wrote re: ByPass Error Page while canceling the event in Event Handler
on 06-04-2009 12:45 PM

<a href="sony-ericsson.blogosword.com/sony-reliability-ericsson-w580i.html">sony">sony-ericsson.blogosword.com/sony-reliability-ericsson-w580i.html">sony reliability ericsson w580i</a>|[url=sony-ericsson.blogosword.com/sony-reliability-ericsson-w580i.html]sony reliability ericsson w580i[/url]

justin wrote re: ByPass Error Page while canceling the event in Event Handler
on 06-08-2009 1:25 PM

<a href="playstation.paycashsite.com/playstation-2-bundle.html">playstation">playstation.paycashsite.com/playstation-2-bundle.html">playstation 2 bundle</a>|[url=playstation.paycashsite.com/playstation-2-bundle.html]playstation 2 bundle[/url]

orelle wrote re: ByPass Error Page while canceling the event in Event Handler
on 06-09-2009 9:45 AM

<a href="psp.mywipsp.com/are-psp-games-region-free.html">are">psp.mywipsp.com/are-psp-games-region-free.html">are psp games region free</a>|[url=psp.mywipsp.com/are-psp-games-region-free.html]are psp games region free[/url]

shaina wrote re: ByPass Error Page while canceling the event in Event Handler
on 06-10-2009 1:44 PM

<a href="gameboy.wips3.info/gameboy-advance-atomic-betty-walkthrough.html">gameboy">gameboy.wips3.info/gameboy-advance-atomic-betty-walkthrough.html">gameboy advance atomic betty walkthrough</a>|[url=gameboy.wips3.info/gameboy-advance-atomic-betty-walkthrough.html]gameboy advance atomic betty walkthrough[/url]

maybell wrote re: ByPass Error Page while canceling the event in Event Handler
on 06-10-2009 6:42 PM

<a href=nintendo-ds.mywipsp.com/action-replay-max-nintendo-ds.html>action">nintendo-ds.mywipsp.com/action-replay-max-nintendo-ds.html>action replay max nintendo ds</a>|[url=nintendo-ds.mywipsp.com/action-replay-max-nintendo-ds.html]action replay max nintendo ds[/url]

winnah wrote re: ByPass Error Page while canceling the event in Event Handler
on 06-30-2009 8:35 PM

<a href=panasonic.blogservers.biz/panasonic-th-42pz800u-under-$1200.php>panasonic th-42pz800u under $1200</a>|[url=panasonic.blogservers.biz/panasonic-th-42pz800u-under-$1200.php]panasonic th-42pz800u under $1200[/url]

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.