?
Solved

Control Order of ascx Render

Posted on 2009-02-11
1
Medium Priority
?
1,269 Views
Last Modified: 2012-05-06
I don't know why it's taken me so long to come across this problem, but I can't seem to find any help on it, but when you have multiple ascx's on an aspx page, how do you know the order they process/render in?
(important if one control relies on the output of another)
The order within the design-time markup doesn't seem to make any difference.
I can find stuff on aspx vs ascx, but nothing ascx/ascx
0
Comment
Question by:Silas2
1 Comment
 
LVL 12

Accepted Solution

by:
CB_Thirumalai earned 1000 total points
ID: 23618436
It depends on the Page Life cycle.  Refer below.
        http://msdn.microsoft.com/en-us/library/ms178472.aspx
Instead of adding the controls to your aspx page, keep a placeholder for each control and add it dynamically doing the Page_Load in a specified order.  This will ensure that the controls events fire are the same order you are adding.
Refer, below to add controls dynamically to page
       http://aspalliance.com/565_Dynamic_Loading_of_ASPNET_User_Controls
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question