Canceling Subsequent events from page_load

D

DazedAndConfused

How can I prevent subsequent events from firing when I have an error in the
page_load event?
 
B

Brock Allen

Can you elaborate? What do you want to happen? WHat should be rendered to
the client?
 
D

DazedAndConfused

This is when there is a postback. a command button is clicked, the page_load
event catches an error and produces an error message and sets the
errorlabel.visible to true and then exits the sub. At that point I want to
render the page. But right now it continues on to the command button
handler.
 
B

Brock Allen

You can keep a boolean field in your page that is set in the Load event and
then checked in the Button command event. The other idea might to simply
check the error Label's Visible bit (instead of kepping a seperate boolean
on the page).
 
D

DazedAndConfused

Thank you
Brock Allen said:
You can keep a boolean field in your page that is set in the Load event
and then checked in the Button command event. The other idea might to
simply check the error Label's Visible bit (instead of kepping a seperate
boolean on the page).
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top