PostBack Event Firing Sequence

Discussion in 'ASP .Net' started by Guadala Harry, Aug 15, 2004.

  1. Just wondering if I can count on Page_Load *always* firing before event
    procedures of other controls on the form.

    E.G., suppose I have a DropDownList server control and it is
    "autopostbacking". Will Page_Load always fire before the
    SelectedIndexChanged event of the DDL?

    Thanks.
     
    Guadala Harry, Aug 15, 2004
    #1
    1. Advertisements

  2. Hi Guadala,

    The Load event will *always* fire *before* the change events, I promess :)

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx
    My profile: http://aspnet2.com/mvp.ashx?vga


    "Guadala Harry" <> wrote in message
    news:...
    > Just wondering if I can count on Page_Load *always* firing before event
    > procedures of other controls on the form.
    >
    > E.G., suppose I have a DropDownList server control and it is
    > "autopostbacking". Will Page_Load always fire before the
    > SelectedIndexChanged event of the DDL?
    >
    > Thanks.
    >
    >
     
    Victor Garcia Aprea [MVP], Aug 15, 2004
    #2
    1. Advertisements

  3. Yes they will always be called after page_load, the order goes like this

    Page_Init
    Page_Load
    Validation
    Event Handling (your control events get fired here)
    Page_Unload

    A good read is
    http://msdn.microsoft.com/library/d...on/html/vbconWebFormsPageProcessingStages.asp

    Stephen.



    "Guadala Harry" <> wrote in message
    news:...
    > Just wondering if I can count on Page_Load *always* firing before event
    > procedures of other controls on the form.
    >
    > E.G., suppose I have a DropDownList server control and it is
    > "autopostbacking". Will Page_Load always fire before the
    > SelectedIndexChanged event of the DDL?
    >
    > Thanks.
    >
    >
     
    Stephen Woolhead, Aug 15, 2004
    #3
  4. You can place a breakpoint in your "page_load" and see what happens.
    Remember to
    configure your project to use "debug".

    Alternatively, you can "cause" an exception in you code and observe the
    order on the call stack.



    "Guadala Harry" <> wrote in message
    news:...
    > Just wondering if I can count on Page_Load *always* firing before event
    > procedures of other controls on the form.
    >
    > E.G., suppose I have a DropDownList server control and it is
    > "autopostbacking". Will Page_Load always fire before the
    > SelectedIndexChanged event of the DDL?
    >
    > Thanks.
    >
    >
     
    Bredal Jensen, Aug 15, 2004
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lisa
    Replies:
    1
    Views:
    714
    Bryant Hankins
    Aug 2, 2004
  2. Phillip N Rounds

    Question re Event Firing Sequence

    Phillip N Rounds, Mar 1, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    568
    Eliyahu Goldin
    Mar 5, 2006
  3. GauravGupta
    Replies:
    4
    Views:
    2,472
    Shilpa1234
    Jan 19, 2012
  4. stef mientki
    Replies:
    13
    Views:
    1,016
    stef mientki
    Oct 20, 2007
  5. Anthony Papillion

    TkInter bind() event is not firing event trigger

    Anthony Papillion, Jun 23, 2010, in forum: Python
    Replies:
    3
    Views:
    2,229
    rantingrick
    Jun 23, 2010
  6. Don
    Replies:
    1
    Views:
    373
    mr fox
    May 16, 2005
  7. tsarna

    Sort not firing PostBack event using Dynamic Columns

    tsarna, Jun 23, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    351
    tsarna
    Jun 28, 2004
  8. Lisa
    Replies:
    1
    Views:
    352
    Bryant Hankins
    Aug 2, 2004
Loading...