473,387 Members | 1,348 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,387 software developers and data experts.

Multiple page load happens on one ASPX page


I have an aspx page with code behind that has the initial page load
code happens many times as user perform different action on the page,
such as select a drop down list. To be more clear, consider the
following code:

protected override void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{
//Code in here gets trigger 3 times every time the user perform
action on asp.net control
// that would triggers post back
}
}

The aspx page code is too complicated to post here. I am curious if
anyone has any possible explanations for different scenario that this
could happens? Thanks for your input.

Quoc Linh

Mar 9 '07 #1
3 12294

- There may be some Response.Redirect in code recursively redirecting
to itself.
- There may be some javascript tied to client-side onload event of
body or some image recursively posting back again and again.
- In VS 2003, AutoEventWireup="true" used to get conflict if during
design you unknowingly had double-clicked a control. However in that
scenario it used to be max two calls.
- Although you explicitly mentioned its an aspx, an ascx may have
Page_Load called multiple times if there are multiple instances on
same page.

Mar 10 '07 #2
- There may be some Response.Redirect in code recursively redirecting
to itself (either directly in same file, or via some other code
suscribing to your code's structured events or bubble events).

- There may be some javascript tied to client-side onload event of
body or some image recursively posting back again and again.

- In VS 2003, AutoEventWireup="true" used to get conflict if during
design you unknowingly had double-clicked a control. However in that
scenario it used to be max two calls, not three.

- Although you explicitly mentioned its an aspx, an ascx may have
Page_Load called multiple times if there are multiple instances on
same page.

Mar 10 '07 #3
On Mar 10, 12:14 am, "Muhammad Naveed Yaseen" <mnyas...@gmail.com>
wrote:
- There may be some Response.Redirect in code recursively redirecting
to itself (either directly in same file, or via some other code
suscribing to your code's structured events or bubble events).

- There may be some javascript tied to client-side onload event of
body or some image recursively posting back again and again.

- In VS 2003, AutoEventWireup="true" used to get conflict if during
design you unknowingly had double-clicked a control. However in that
scenario it used to be max two calls, not three.

- Although you explicitly mentioned its an aspx, an ascx may have
Page_Load called multiple times if there are multiple instances on
same page.
Thank you for the reply. I will re-exam my code with these
possibilities.

Mar 12 '07 #4

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

Similar topics

3
by: rachel | last post by:
Hi all, I am new in ASP.Net. I have a question on link multiple web forms together. Here is the scenario: I create an Index.aspx WebForm which consists of a banner and three navigator...
7
by: Anne | last post by:
hie there, i want to be able to pass multiple parameters to another page. currently, i am able to do so, but somehow i feel it is not the correct way to do it. below is part of what i have so far....
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
0
by: Frank 'Olorin' Rizzi | last post by:
Hello everyone. This is quite convoluted, but I'll try to make it simple. I have a couple of bottom-line questions (I guess): 1~ what happens between the Page_Load routine in the code behind...
3
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313...
0
by: rajani&chinta | last post by:
Hi I have a ASPX page where the users posts an XML file to the ASPX page, in the page load of the ASPX we process the XML file and create a object of CustomerData, which again calls a routine to...
1
by: Bob Loveshade | last post by:
I am looking for an example that shows how to select and highlight multiple rows in a DataGrid. My DataGrid is part of a Web User Control which is contained in an ASPX page. I haven't been...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
1
by: dnes | last post by:
Open Multiple New Browser Windows from ASP.NET I'm having trouble figuring out how to open multiple new browser windows (each one displaying something different). As you can see from the code...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.