473,651 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execution order of PageLoad for user controls

Hello all

I am trying to understand the execution order of the PageLoad routines in two different user controls on the same page. In particular, I need one to execute before the other, but I can't seem to change the order. It doesn't appear to depend on the order in which they are registered on the page. Any thoughts

Thanks

Bill Borg
Nov 18 '05 #1
2 2246
Hi,

basically you can't rely on order of the events. You make things sure by
calling custom methods (which do the task you now have in event handlers) of
the user controls in order, say in Page's Load event handler.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Bill Borg" <an*******@disc ussions.microso ft.com> wrote in message
news:70******** *************** ***********@mic rosoft.com...
Hello all,

I am trying to understand the execution order of the PageLoad routines in
two different user controls on the same page. In particular, I need one to
execute before the other, but I can't seem to change the order. It doesn't
appear to depend on the order in which they are registered on the page. Any
thoughts?

Thanks,

Bill Borg
Nov 18 '05 #2
This helps a lot, thanks.
Nov 18 '05 #3

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

Similar topics

1
4183
by: Bijoy Naick | last post by:
I have 3 labels called eventDate, eventStartTime and eventEndTime. I have 3 validators as well. One checks to make sure that a date is specified (RequiredFieldValidator), the other makes sure that the date is valid (CompareFieldValidator) and the third (a custom validator) makes sure that the eventStartTime is before the eventEndTIme. The custom validator takes the eventDate and start/end times, creates 2 variables of type DateTime and...
3
1538
by: Philip Poole | last post by:
Hello everyone, Please help with this as it is driving me up the wall and it is urgent i finish this page, this is the first time I have used User Controls and I think I must have completly misunderstood a basic point. I have a number of user controls which are used to make up my page. One control is a series of tabs which are created dynamically from a database. When someone clicks on a tab, the page reloads and the tabs that was...
1
272
by: Wayne Wengert | last post by:
This is my first attempt to use a User Control and I am totally confused. Basically, I am rewriting a set of ASP pages in ASP.NET (VB). The old ASP files used Include files for common sub routines like connection, managing background color on objects with focus, etc.. In looking through my asp.net books, googling and browsing MS sites I believe that the correct approach is to use a User Control in place of the Include files? The books all...
0
2284
by: jonelling | last post by:
I am having a problem where the page load event is not being fired for certain user controls that I load dynamically in placeholders. Here is what I'm doing in brief, with full test code supplied at the bottom. In my controlling .aspx page, in the page_init() sub, if not postback, I load two user controls and place them in placeholders. This works and a trace statement in each user control's page load handler is executed on initial...
7
1291
by: Mr Newbie | last post by:
Hi There, Here I am messing about with User Controls and I seem to have a conundrum on my hands which I'm sure you chaps will unravel for me in the blink of an eye.
23
4014
by: roman | last post by:
Hi, I would like to have two actions for one event. But I want the second action to trigger when the first one action completes. Is it possible to do this in javascript? I'm using the onclick event. Thanks, Roman
1
2238
by: Demetri | last post by:
I'm trying to determine if we want to use panels or user controls for our pages. Our primary concern is performance, page loading and posting speed. To illustrate my question, lets use the Customer Orders scenario: Problem: User needs to view orders and and edit, add, save on one page called Orders.aspx. To begin with the page contains a grid with basic information about an order. The user can click a row to edit or click an "Add"...
1
1501
by: npverni | last post by:
I have a fairly complex form that needs to load and maintain the state of several different dynamic user controls. Here is the workflow: 1) A series of editable user controls (each containing basic web form elements: textboxs, buttons, etc) are loaded from an xml file. 2) The user can either edit these user controls or select from a list of user controls to add to teh page. 3) The user clicks "save" to save the content of all of...
1
1214
by: NKaufman | last post by:
In my pageload I am adding multiple instances of same User control. They all have properties ID and ParentID. Now I also have a button in each User control and am bubbling the event back to main form. No problem so far. Now in the event handler method, I get the ID of the user control that raised the event (through the ID property of sender). I now need to go through all the user controls on my page to see which one has parentID...
0
8352
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8802
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8465
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1587
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.