How to know which event fired before it is handled?

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.
 
K

Kevin Yu [MSFT]

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."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top