We help IT Professionals succeed at work.

Control Order of ascx Render

Silas2 asked
Medium Priority
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
Watch Question

It depends on the Page Life cycle.  Refer below.
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.