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 "SelectedIndexC hanged" and
populates DropDownList2 with appropriate entries.
DropDownList3 is set to auto post back on "SelectedIndexC hanged" and
populates DropDownList4 with appropriate entries.
Button submits the form and redirects to Page2.aspx on (Page.IsValid)
using Response.Redire ct
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 "SelectedIndexC hanged" and
populates DropDownList2 with appropriate entries.
Button submits the form and redirects to Page4.aspx on (Page.IsValid)
using Response.Redire ct
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.EventHan dler(this.Page_ Load);"
properly set in InitializeCompo nent()
* I'm using IE 6sp1 0 1626 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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 original
System.Web.UI.Page in order to have common checks in the page base.
i make securirty checks in the page base page_load event.
if the security fails, i can do whatever i want before the "real" / derived
page gets to be executed.
|
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
|
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 of the main application page is executed 2 times in a row.
I've created a simple test page and so it works for it, only one execution.
|
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 continues to the
custom user control code and it blows there because of the error
occured initially in the ASPX page. When it blows it displays as
unhandled error even though I have try catch in my ASPX page and in
the custom user control.
| |
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 at the
bottom.
In my controlling .aspx page, in the page_init() sub, if not postback,
I load two user controls and place them in placeholders. This works
and a trace statement in each user control's page load handler is
executed on initial...
|
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 CommonPageBase
- Contains myPage which inherits PageBase
Each of these classes overrides OnInit and ties an event handler
|
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 identifying memory
leaks. The application in question is the Mozilla Web Browser. I also
have had similar tasks before in the compiler construction area. And
it is easy to come up with many more examples, where such kind of
statistics can be very...
|
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 site, Page_Load gets called twice. Why
is that and how can I fix this problem ?
Thank you very much.
Imports System.IO
Namespace myProject
Partial Class WebForm1
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |