Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Multiple page load happens on one ASPX page

Reply
Thread Tools

Multiple page load happens on one ASPX page

 
 
quoclinh
Guest
Posts: n/a
 
      03-09-2007

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

 
Reply With Quote
 
 
 
 
Muhammad Naveed Yaseen
Guest
Posts: n/a
 
      03-10-2007

- 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.

 
Reply With Quote
 
 
 
 
Muhammad Naveed Yaseen
Guest
Posts: n/a
 
      03-10-2007
- 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.



 
Reply With Quote
 
quoclinh
Guest
Posts: n/a
 
      03-12-2007
On Mar 10, 12:14 am, "Muhammad Naveed Yaseen" <(E-Mail Removed)>
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What happens when type conversion between signed and unsigned happens? NM C++ 6 09-20-2006 05:39 PM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
What happens between events Load and PreRender. ASP.NET bug? mortb ASP .Net 3 11-30-2004 11:49 PM
Re: Multiple aspx for one aspx.cs Phil Winstanley [Microsoft MVP ASP.NET] ASP .Net 1 06-24-2004 02:47 PM
Multiple aspx for one aspx.cs Iain ASP .Net 0 06-24-2004 11:20 AM



Advertisments