471,316 Members | 1,146 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

Canceling Subsequent events from page_load

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

Nov 19 '05 #1
4 1093
Can you elaborate? What do you want to happen? WHat should be rendered to
the client?

-Brock
DevelopMentor
http://staff.develop.com/ballen
How can I prevent subsequent events from firing when I have an error
in the page_load event?

Nov 19 '05 #2
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.

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
Can you elaborate? What do you want to happen? WHat should be rendered to
the client?

-Brock
DevelopMentor
http://staff.develop.com/ballen
How can I prevent subsequent events from firing when I have an error
in the page_load event?


Nov 19 '05 #3
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).

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
Can you elaborate? What do you want to happen? WHat should be
rendered to the client?

-Brock
DevelopMentor
http://staff.develop.com/ballen
How can I prevent subsequent events from firing when I have an error
in the page_load event?

Nov 19 '05 #4
Thank you
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
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).

-Brock
DevelopMentor
http://staff.develop.com/ballen
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.

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
Can you elaborate? What do you want to happen? WHat should be
rendered to the client?

-Brock
DevelopMentor
http://staff.develop.com/ballen
How can I prevent subsequent events from firing when I have an error
in the page_load event?


Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kenton Smeltzer | last post: by
3 posts views Thread by Mike | last post: by
4 posts views Thread by Mohammed AlQuraishi | last post: by
1 post views Thread by AT | last post: by
5 posts views Thread by Paal Berggreen | last post: by
6 posts views Thread by Steve Hershoff | last post: by
1 post views Thread by Dom | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.