473,513 Members | 3,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event firing problem

I create a simple web page, put on a couple of
<asp:listboxes with
autopost=true. I then write code in the events behind
them, doing some simple stuff like using the values in the
first listbox to effect the values in the second listbox
(with a button to fire off Page_Load, which processes the
selected values in the listboxes). When I step through
them in the debugger I see that the events behind the
listboxes fire when I select values in the listboxes, and
Page_Load doesnt fire until I click on the button -
exactly as I expect.

However, when I take the same listboxes and place them in
a web control (which inherits it a base class), Page_Load
is always called when I select items in the listbox (after
Page_Load processes the event behind listbox is fired, but
the damage is done) - NOT what I want.

I would like to solve this myself, but so far all Ive done
is spent a lot of quality time in the debugger, and
deadlines loom near. Can someone please give me some
ideas on how to solve this, where to start looking?

Thanks much, Mark
Nov 17 '05 #1
2 975
are you using Page.IsPostBack to init or not to init ?

"Mark Aurit" <ma********@ngc.com> wrote in message
news:02****************************@phx.gbl...
I create a simple web page, put on a couple of
<asp:listboxes with
autopost=true. I then write code in the events behind
them, doing some simple stuff like using the values in the
first listbox to effect the values in the second listbox
(with a button to fire off Page_Load, which processes the
selected values in the listboxes). When I step through
them in the debugger I see that the events behind the
listboxes fire when I select values in the listboxes, and
Page_Load doesnt fire until I click on the button -
exactly as I expect.

However, when I take the same listboxes and place them in
a web control (which inherits it a base class), Page_Load
is always called when I select items in the listbox (after
Page_Load processes the event behind listbox is fired, but
the damage is done) - NOT what I want.

I would like to solve this myself, but so far all Ive done
is spent a lot of quality time in the debugger, and
deadlines loom near. Can someone please give me some
ideas on how to solve this, where to start looking?

Thanks much, Mark

Nov 17 '05 #2
Page.IsPostback to populate the first listbox ("lc1"); the
SelectedIndexChanged event for lc1 is used to populate the
second listbox ("lc2").
-----Original Message-----
are you using Page.IsPostBack to init or not to init ?

"Mark Aurit" <ma********@ngc.com> wrote in message
news:02****************************@phx.gbl...
I create a simple web page, put on a couple of
<asp:listboxes with
autopost=true. I then write code in the events behind
them, doing some simple stuff like using the values in the first listbox to effect the values in the second listbox
(with a button to fire off Page_Load, which processes the selected values in the listboxes). When I step through
them in the debugger I see that the events behind the
listboxes fire when I select values in the listboxes, and Page_Load doesnt fire until I click on the button -
exactly as I expect.

However, when I take the same listboxes and place them in a web control (which inherits it a base class), Page_Load is always called when I select items in the listbox (after Page_Load processes the event behind listbox is fired, but the damage is done) - NOT what I want.

I would like to solve this myself, but so far all Ive done is spent a lot of quality time in the debugger, and
deadlines loom near. Can someone please give me some
ideas on how to solve this, where to start looking?

Thanks much, Mark

.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
21962
by: Pete | last post by:
I have some funky form/event behavior. Access 97. Split frontend/backend, using Access security. I have the same behavior (or lack of behavior) for the pag_Click() event of two separate pages on different menu forms. Details: frmTRNMenu is the main menu of the application. It uses tabbed pages to logically separate menu items. The...
13
7445
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the...
5
2793
by: Steve M | last post by:
Why are my sessions lasting so long? I have them set to 20 minute timeout in config file? The Session_End event is getting called an hour or more sometimes--well after the user has stopped interacting with my site. Anyone have any insight? Thanks in advance
2
1124
by: David | last post by:
Hi all, I am dynamically creating a LinkButton in my datagrid, however, the event that I am creating for it is not firing. I am obviously missing something? What am I missing? Here is the code in my datagrid ItemDataBound
5
4924
by: Engineerik | last post by:
I have a login form which I want to display with the showdialog method. When I do that the event handler for the load event does not run. If I use the show method the load event handler runs perfectly. I can't find any documentation regarding the load event not firing when a form is displayed using the showdialog method.
3
3748
by: Brett | last post by:
I'm using a third part component in a certain app. The component has methods and events. I noticed one particular event was not firing after a while but it should have been. The problem was the "handles" part was missing. I didn't remove this that I know of. After putting this back in, the event started firing. Actually, the code inside...
6
28100
by: Kevin Attard | last post by:
I am using a GridView inside a UserControl which has a template column for deleting the rows. Before databinding the gridview i am attaching the RowCommand and RowDataBound event. I am using the RowDataBound event to set the commandargument of the delete button. The event is being fired and works fine. When I press the delete button, the...
2
2157
by: Sam | last post by:
While attempting to get my floating toolbar to work in ASP.NET 2.0, I noticed that the onscroll event is not firing. I've specified this on the BODY tag, as always. After some testing, I realized that the new DocType being used in 2.0 (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
5
4521
by: jaysonnward | last post by:
Hello All: I've recently been recreating some 'dropdown menus' for a website I manage. I'm writing all my event handlers into my .js file. I've got the coding to work in Firefox, but the onmouseleave / onmouseout event I've attached to my hidden drop down (in this case an <ul>), is not firing correctly. It seems that when the mouse...
2
3899
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever...
0
7270
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.