Try unhooking your delegate in the Init event of the web page. If that is too late then I don't know what you would do. :(
James C. -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Kazmer, Brad Sent: Monday, April 18, 2005 12:56 PM To: [email protected] Subject: Re: How to suppress an event I can't write the "if something is true" in Event_A. The control in question is actually a custom server control. When an event fires, first the server control handles the event and does someStuff(), then a delegate handler on the webpage is called and does moreStuff(). If I write the "if something is true" code in Event_A on the webpage, then someStuff() will already have executed. I would like neither someStuff() nor moreStuff() to execute and was thinking that there is a way to completely suppress the control's event in Page_Load. Sorry if I should have been more specific in my first email. -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of James Conley Sent: Monday, April 18, 2005 12:09 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] How to suppress an event You know something in the Page_Load event that tells you that you don't really want to respond to Event_A? Will you still know that in Event_A? If so then write the handler for Event_A such that... If (Something is True) 'do nothing Else 'regular event code End If James C. -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Kazmer, Brad Sent: Monday, April 18, 2005 11:45 AM To: [email protected] Subject: How to suppress an event In ASP.Net, a server event is triggered on a server control. Is there any way to suppress the server event in the Page_Load event before it is called? ***** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. 162 =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com ***** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. 117 =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
