473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Inconsistent execution of Page_Load() method call

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
Nov 18 '05 #1
0 1599

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jerzy Karczmarczuk | last post by:
Gurus, before I am tempted to signal this as a bug, perhaps you might convince me that it should be so. If I type l=range(4) l.extend() l gives , what else... On the other hand, try
13
by: z. f. | last post by:
Hi, i have a class that is derived from System.Web.UI.Page, and this is the class i use in my application as PageBase. all other page classes are deriverd from my PageBase instead of the...
6
by: Yama | last post by:
Hi, Is there a way to execute a function after 1 minute on server-side once a web form is rendered? Can you please show me some code to illustrate this? Thanks, ~yamazed
1
by: SΓ©bastien DELCROIX | last post by:
Hi, Firstable, please excuse my approximative english which is not my native langage. So, I post here because I encount the following problem on my ASP.NET application : The Page_load method...
2
by: Gopal Krish | last post by:
Folks, My ASPX page uses a custom user control. What happens here is that when a runtime error occurs in the ASPX page, the error is caught in the error handler and then strangely, the execution...
0
by: jonelling | last post by:
I am having a problem where the page load event is not being fired for certain user controls that I load dynamically in placeholders. Here is what I'm doing in brief, with full test code supplied...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
17
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also...
11
by: fiefie.niles | last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a sub mySub that does not do anything (for testing purposes). But, Page_Load gets called twice. On every single ASPX page in my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.