Yes, I am aware of that.

The really obscure sender, e stuff can be very useful at times.  You can write 
a method that is activated by events from multiple objects and use sender to 
determine which object sent the generated the event.  The Event Arguments are 
useful in this case as well - each event-generating object can send a different 
argument to the method.

- Matt Small

-----Original Message-----
From: Eric Carlisle [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 27, 2005 9:18 AM
To: CF-Community
Subject: Re: .NET glitches (WAS Guilty Pleasures)

Matthew Small wrote:

>You're right about the handlers becoming detached, but it is easy to restore
>them (by clicking on the button in the design view) or by writing them
>yourself.
>  
>
Just remember that Design Mode can sometimes rewrite your HTML (like 
other design modes).  After reattaching the event, switch back to HTML 
View and check to see if the HTML has been changed.  If it was, hit 
Ctrl-Z once, which will undo changes to HTML (but not the design-vew or 
code-behind changes).

I like using this approach because it writes the event handler directory 
into the page init event (which IMHO is a little better than placing the 
Event Handler directly on the <ASP:whatever> web contol.  It also writes 
the event handler with the really obscure (sender object, 
WeirdAssObjectArgumentType e).

Eric




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:158848
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to