Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > event handling in asp.net

Reply
Thread Tools

event handling in asp.net

 
 
Mike Gaab
Guest
Posts: n/a
 
      04-01-2006
I am having two problems:

1. Determing the signature of event handlers for any control that raises
events. I have a handle on the arguments but the method name is not clear.

2. What is the relationship between event properties and public methods
listed in the VS class browser. An example will help describe this one.

For example, the DataGrid has a event property named EditCommand, what is
the signature of the event handler for the event?

The DataGrid also exposes a public method called OnEditCommand(...),
is this method associated to the EditCommand?

In the meantime, I'll create an example and maybe answer my question.

Mike



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
 
 
 
Flinky Wisty Pomm
Guest
Posts: n/a
 
      04-01-2006
The public methods associated with control events allow you to manually
raise the event. When you call that method and pass a
DataGridCommandEventArgs, the control will in turn call any event
handlers, passing itself and that same EventArgs instance. You might
want to do this from a custom control, for example - you could have a
custom control inside a datagrid and in the handler for its onclick
method, raise the onEditCommand event of the containing grid.

The signature for the event is void (object, DataGridCommandEventArgs)

There isn't always a quick and easy way of working put what the
signature of an event handler should be - I personally use Google, or a
FireFox bookmarklet.

 
Reply With Quote
 
 
 
 
Mike Gaab
Guest
Posts: n/a
 
      04-01-2006

"Flinky Wisty Pomm" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> The public methods associated with control events allow you to manually
> raise the event. When you call that method and pass a
> DataGridCommandEventArgs, the control will in turn call any event
> handlers, passing itself and that same EventArgs instance. You might
> want to do this from a custom control, for example - you could have a
> custom control inside a datagrid and in the handler for its onclick
> method, raise the onEditCommand event of the containing grid.
>
> The signature for the event is void (object, DataGridCommandEventArgs)
>
> There isn't always a quick and easy way of working put what the
> signature of an event handler should be - I personally use Google, or a
> FireFox bookmarklet.
>


The methods that are associated with control events are protected, not
public. So if I subclass DataGrid I should have access to those methods but
I don't? I am from the Java world so this is not making sense that I can't
see the control event methods from the subclass. I probably have to
declare/define them in the subclass. Could easily be missing something but
can't see what that is right now. Hmmmm...

Mike



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
Flinky Wisty Pomm
Guest
Posts: n/a
 
      04-01-2006
Sorry, my bad they are protected, yes - you can't access them from the
subclass? That's odd. Ignore my ravings about handling them earlier. Up
all night.

You should be able to call them from a derived class, or override them
- if you override an event method, make sure that you call
base.OnWhateverEvent. Can you post some code?

 
Reply With Quote
 
Mike Gaab
Guest
Posts: n/a
 
      04-01-2006

"Flinky Wisty Pomm" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Sorry, my bad they are protected, yes - you can't access them from the
> subclass? That's odd. Ignore my ravings about handling them earlier. Up
> all night.
>
> You should be able to call them from a derived class, or override them
> - if you override an event method, make sure that you call
> base.OnWhateverEvent. Can you post some code?
>


Hey - no problem.
No example code.

Get some sleep.

Mike



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
signal handling and (structured) exception handling Peter C++ 34 10-17-2009 10:03 AM
python list handling and Lisp list handling Mark Tarver Python 22 04-26-2009 09:36 PM
Is faster handling hexadecimal values than handling chars? IƱaki Baz Castillo Ruby 1 04-15-2008 09:04 AM
ASP.NET Event handling. Makarand ASP .Net 0 07-24-2003 01:46 PM
Pager and Event Handling sunil ASP .Net 2 07-18-2003 09:08 PM



Advertisments