How to know which event fired before it is handled?

  • Thread starter Thread starter SevDer
  • Start date Start date
S

SevDer

Hi,

I would like to know whether specific event is being fired or not before
this event is handled.

To be more clear I have the ASP.NET page and a few button etc. events
declared in it.
At the page_load event handling, I would like to know if button1_click event
is being fired or not?

How can I do this?

Many thanks in advance.
 
Hi SevDer,

First of all, I would like to confirm my understanding of your issue. Do
you mean that you need to know if button1.Click event has been fired before
page.Load? If there is any misunderstanding, please feel free to let me
know.

If this is the case, I think we cannot get this information from the event
or event handler directly. The only think we can do is to save the status
to ViewState or Session. In the page_Load event handler, we check this
status and know whether the button has been clicked before.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top