Why page_load is called twice in my web application?

Posted by harisri786 on Stack Overflow See other posts from Stack Overflow or by harisri786
Published on 2010-03-29T11:04:06Z Indexed on 2010/03/29 11:13 UTC
Read the original article Hit count: 288

Hi,

I have already gone through some of the posts in many websites regarding page_load being called twice but my problem is little bit different from those.

My problem is with the landing page of my web application.

Initially in my website page_load for the landing page was getting called twice every time when it is loaded. Since my application is an upgraded one (from VS 2003 to VS 2005/2008), I commented the "this.load" event in InitializeComponent. Now it works fine, when user first logs in, into my web application. But then, whenever user navigates to this page from any other page in my application, page_load gets called twice.

Does anybody have any idea about why this could be happening. I tried to track the call stack for this, but VS 2008 was showing that this was getting called from external code.

Also, I am using frames in my web application. I wonder if this problem has anything to do with frames.

Any help is deeply appreciated.

Regards,

Hari

© Stack Overflow or respective owner

Related posts about page-load

Related posts about twice