Inconsistent execution of Page_Load() method call

Discussion in 'ASP .Net' started by Itai, Aug 3, 2004.

  1. Itai

    Itai Guest

    Background:

    I have four Web Form pages with respective C# code behind files,
    all in the same project:

    localhost/vpath1

    Page1.aspx
    Page2.aspx

    Localhost/vpath2

    Page3.aspx
    Page4.aspx


    I am encountering two issues with respect to Page1.aspx and Page3.aspx
    Page_Load() method execution.


    Case no.1:

    Page1.aspx has five Webcontrols: 4 DropDownList and 1 Button

    DropDownList1 is set to auto post back on "SelectedIndexChanged" and
    populates DropDownList2 with appropriate entries.

    DropDownList3 is set to auto post back on "SelectedIndexChanged" and
    populates DropDownList4 with appropriate entries.

    Button submits the form and redirects to Page2.aspx on (Page.IsValid)
    using Response.Redirect


    The problem:

    Setting *** Trace = "true" *** in Page1.aspx, putting a breakpoint on
    its Page_Load() and running the page in debug mode results in the
    following behavior:


    1. Debugger stops on Page1.Page_Load() - press cont. –
    2. Change DropDownList1
    3. Debugger stops on Page1.Page_Load() - press cont. –
    4. Change DropDownList3
    5. Debugger stops on Page1.Page_Load() - press cont. –
    6. Click Button
    7. Debugger stops on Page1.Page_Load() - press cont. –
    8. Page2.aspx displays
    9. Press browser Back button
    10. Debugger stops on Page1.Page_Load() - press cont. –
    11. Page1.aspx displays

    Setting *** Trace = "false" *** in Page1.aspx, putting a breakpoint on
    its Page_Load() and running the page in debug mode results in the
    following behavior:


    1. Debugger stops on Page1.Page_Load() - press cont. –
    2. Change DropDownList1
    3. Debugger stops on Page1.Page_Load() - press cont. –
    4. Change DropDownList3
    5. Debugger stops on Page1.Page_Load() - press cont. –
    6. Click Button
    7. Debugger stops on Page1.Page_Load() - press cont. –
    8. Page2.aspx displays
    9. Press browser Back button
    10. Page1.aspx displays (No debugger stop on Page1.Page_Load() )



    Case no.2:

    Page3.aspx has 3 Webcontrols: 2 DropDownList and 1 Button

    DropDownList1 is set to auto post back on "SelectedIndexChanged" and
    populates DropDownList2 with appropriate entries.

    Button submits the form and redirects to Page4.aspx on (Page.IsValid)
    using Response.Redirect


    The problem:

    Setting *** Trace = "true" *** in Page3.aspx, putting a breakpoint on
    its Page_Load() and running the page in debug mode results in the
    following behavior:

    1. Debugger stops on Page3.Page_Load() - press cont. –
    2. Change DropDownList1
    3. Debugger stops on Page3.Page_Load() - press cont. –
    4. Click Button
    5. Debugger stops on Page3.Page_Load() - press cont. –
    6. Page4.aspx displays
    7. Press browser Back button
    8. Browser displays the following message:

    "Warning: Page has Expired The page you requested was created using
    information you submitted in a form. This page is no longer available.
    As a security precaution, Internet Explorer does not automatically
    resubmit your information for you.

    To resubmit your information and view this Web page, click the Refresh
    button."

    Setting *** Trace = "false" *** in Page3.aspx, putting a breakpoint on
    its Page_Load() and running the page in debug mode results in the
    following behavior:

    1. Debugger stops on Page3.Page_Load() - press cont. –
    2. Change DropDownList1
    3. Debugger stops on Page3.Page_Load() - press cont. –
    4. Click Button
    5. Debugger stops on Page3.Page_Load() - press cont. –
    6. Page4.aspx displays
    7. Press browser Back button
    8. Page3.aspx displays (No debugger stop on Page3.Page_Load() )



    Can anyone explain this behavior, I'm quite desperate?

    Thanks in advance,

    -Itai.


    p.s

    All pages have "this.Load += new System.EventHandler(this.Page_Load);"
    properly set in InitializeComponent()


    * I'm using IE 6sp1
    Itai, Aug 3, 2004
    #1
    1. Advertising

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. bminder
    Replies:
    1
    Views:
    2,151
    nfedin
    Feb 23, 2004
  2. z. f.
    Replies:
    0
    Views:
    548
    z. f.
    Oct 19, 2004
  3. lonelyplanet999

    Inconsistent execution output

    lonelyplanet999, Nov 18, 2003, in forum: Java
    Replies:
    5
    Views:
    311
    Thyme
    Nov 20, 2003
  4. rockdale
    Replies:
    1
    Views:
    647
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Nov 16, 2006
  5. Itai
    Replies:
    10
    Views:
    286
    Jim Cheshire [MSFT]
    Aug 10, 2004
Loading...

Share This Page