views:

191

answers:

3

Are declaring custom .NET event such as this, more common in a winform app than webform?

+1  A: 

Custom events are probably a bit more rare in webforms compared to winforms, since http is stateless. So in many cases, a user action you want to react on, often come in form as a request, where you use the querystring parameters to determine what and how to react.

But i still find custom events very useful in my ascx usercontrols, because its an easy way to hide details about how the user control works internally, and just expose an event that the page can react on when interesting stuff happens.

Tom Jelen
A: 

Thanks. If I have several folders containing usercontrols, is there something I can search on to determine which of them might be using custom events?

4thSpace
+1  A: 

A text search for for the keyword "event " (notice the space in the end) would give a good indication of classes that exposes custom events.

Tom Jelen