AddHandler question

C

Craig Buchanan

I have two AddHandler statements in the Page_Load sub. Do these only fire
during a postback?

Thanks,

Craig Buchanan
 
F

Felbrigg

I suspect they will fire every time the page postsback unless you protect
them using IsPostBack
 
K

Kevin Spencer

If you're asking if the Event Handler Method that it refers to will fire
during a PostBack, the answer is, it will fire if it is added correctly
during the PostBack, and if a client-side event has triggered it. An Event
Handler could not fire if there is no PostBack, because the only time this
occurs is when the Page is first loaded into the browser, and therefore, no
client-side events have occurred. A client-side event triggers a PostBack.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top