Results 1 to 2 of 2

Thread: User Controls order of execution *RESOLVED*

  1. #1

    Thread Starter
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    User Controls order of execution *RESOLVED*

    I have two User Controls on a page - on contains details of a shopping basket (just number of items and total cost) the other contains details of a product.

    The shopping basket user control updates on Page_Load however when a new product is added to the basket through a click event in the product user control the shopping basket doesn't display this addition immediately.

    It seems the shopping basket Page_Load method fires before the product click event and hence the shopping basket doesn't show the new product added until the page is posted again.

    I'm confused because surely the Page_Loads should be the last to fire?

    Help!

    DJ
    Last edited by dj4uk; Feb 15th, 2005 at 09:58 AM. Reason: Resolved

  2. #2

    Thread Starter
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: User Controls order of execution

    I've changed Page_Load to Page_PreRender and it works fine now.

    I had the order of execution all the wrong way.

    DJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width