Arun Rana
Arun Rana

Reputation: 8606

Pageload event occures twice in asp.net page

I am facing very strange issue , that in one of my page pageload event handled 2 times , there is no any code that will make this 2nd pageload, what should be the problem with this page, please give your views if you have found similar issue in your development life!

Update :

I have checked with different browsers and found that this issue occurs only with Chrome

Thanks.

Upvotes: 1

Views: 1617

Answers (5)

Julian
Julian

Reputation: 1

It's a Chrome bug. Some say that it has to do with "Favicon.ico" (See also https://code.google.com/p/chromium/issues/detail?id=64810 )

The issue does not present itself in FF or IE.

It's NOT a JS issue. I encountered the same issue with pages that add entries to a database log: when that page is invoked with Chrome (but not FF or IE), the log appears twice :(

Upvotes: 0

Arun Rana
Arun Rana

Reputation: 8606

This was due to chrome request Favicon.ico. I got this problem when i out watch on Request.URL through debugging.

Upvotes: 0

Mariusz
Mariusz

Reputation: 3154

I had identical issue on my web page.

Source of that issue was empty "src" in images on page. Try to look on this thread.

Mariusz

Upvotes: 0

Alexander Yezutov
Alexander Yezutov

Reputation: 3214

It is possible, that you have AutoEventWireUp set to true and at the same time you're subscribing to the event explicitly: this.Load += Page_Load;.

So, either set AutoEventWireUp in @Page directive to false or remove explicit subscription.

For more information on AutoEvetWireUp: http://forums.asp.net/p/932513/1096656.aspx

Upvotes: 1

user958802
user958802

Reputation: 63

set AutoEventWireup="false".......

Upvotes: 0

Related Questions