473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1175
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: V | last post by:
I have found that when I have a composite control that uses the CreateChildControls method, on a regular page load, Page_Load executes before CreateChildControls, but on a postback it is the...
3
by: Kenton Smeltzer | last post by:
Hello All, I am having a problem with events and the addition of controls on a page I am developing. First let me tell you what I have tried and then maybe someone can see something I missed. ...
3
by: Mike | last post by:
Hi, I am adding controls dynamically in a WebForm, but none of these controls' events fire. Here is the class code I am using. I have tried so many things, but nothing works :-( namespace...
4
by: Mohammed AlQuraishi | last post by:
Hi, I'm having trouble with synchronizing the order of server-side events, and I was hoping someone here can shed some light on what's happening. In a simplified version, I click on a button...
1
by: AT | last post by:
I have an aspx page with this code behind Public Class WebForm1 Inherits Class1 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '...
5
by: Paal Berggreen | last post by:
I am involved with development of a Portal solution using ASP.NET 2.0 and WebParts. The WebParts framework use the default personalization providers, and the personalization data thus ends up in...
6
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost...
1
by: Dom | last post by:
I selectively "disable" certain items in a ListBox. They appear gray and italicized. I want to make sure the user never selects these. Is there a way I can do this? For example, can I capture...
25
bugboy
by: bugboy | last post by:
I'm trying to find a cross browser solution for editing text in a flickr photo caption manor where the text is displayed in a <div> or <a> tag but changes to a <textarea> via JS when clicked. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.