Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Page_Load fires twice with Mozilla

Reply
Thread Tools

Page_Load fires twice with Mozilla

 
 
=?Utf-8?B?RWQ=?=
Guest
Posts: n/a
 
      11-20-2004
Has anyone seen this one? I have a situation where code in my page_load event
is firing twice for mozilla firefox users. Everything is fine in IE6. I set
breakpoints and verified.
The second time the page_load fires in mozilla, I checked the IsPostback to
verify that it is still false.
What causes this behavior?
Thanks,
Ed

 
Reply With Quote
 
 
 
 
Kumar Reddi
Guest
Posts: n/a
 
      11-20-2004
Hi Ed,
check to see if you have AutoEventWireup set to true in the Page
directive

Kumar

"Ed" <> wrote in message
news:C73265EF-E329-460D-A23F-...
> Has anyone seen this one? I have a situation where code in my page_load

event
> is firing twice for mozilla firefox users. Everything is fine in IE6. I

set
> breakpoints and verified.
> The second time the page_load fires in mozilla, I checked the IsPostback

to
> verify that it is still false.
> What causes this behavior?
> Thanks,
> Ed
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?RWQ=?=
Guest
Posts: n/a
 
      11-20-2004
Hi,
I currently have it set to false.

Thanks,
Ed

"Kumar Reddi" wrote:

> Hi Ed,
> check to see if you have AutoEventWireup set to true in the Page
> directive
>
> Kumar
>
> "Ed" <> wrote in message
> news:C73265EF-E329-460D-A23F-...
> > Has anyone seen this one? I have a situation where code in my page_load

> event
> > is firing twice for mozilla firefox users. Everything is fine in IE6. I

> set
> > breakpoints and verified.
> > The second time the page_load fires in mozilla, I checked the IsPostback

> to
> > verify that it is still false.
> > What causes this behavior?
> > Thanks,
> > Ed
> >

>
>
>

 
Reply With Quote
 
Greg Johnson
Guest
Posts: n/a
 
      12-01-2004
> Hi,
> I currently have it set to false.
>
> Thanks,
> Ed


I'm seeing the same thing. I have AutoEventWireup also set to false,
yet I see Page_Init and Page_Load getting called twice in Firefox. In
IE, it only gets called once. A bug in Firefox?
 
Reply With Quote
 
=?Utf-8?B?RWQ=?=
Guest
Posts: n/a
 
      12-07-2004
Actually, I found the answer to my own problem. It occured for me in the
html. We had an external javascript file included in the control we used for
the page header. Under certain situations, it would be written out as double
quotes without the file name. That caused the page to load twice. I assure
you that was not an easy find.

I have heard other instances of similiar problems with malformed html or css.

Hope that helps.

"Greg Johnson" wrote:

> > Hi,
> > I currently have it set to false.
> >
> > Thanks,
> > Ed

>
> I'm seeing the same thing. I have AutoEventWireup also set to false,
> yet I see Page_Init and Page_Load getting called twice in Firefox. In
> IE, it only gets called once. A bug in Firefox?
>

 
Reply With Quote
 
drogovoy drogovoy is offline
Junior Member
Join Date: Jun 2009
Posts: 1
 
      06-03-2009
I've read that everything matters to firefox. For example closing css lines with ";" even though it displayed correctly. Also colors start with #.
In my case my asp.net pages contained asp:image controls where imageurl property was not present at all. After I added it only postback happens. -Tool a while to get this right also. Both Safari and Crome worked fine even without it.
 
Reply With Quote
 
nkindia nkindia is offline
Junior Member
Join Date: Sep 2009
Posts: 2
 
      09-02-2009
1) There is atleast one blank link to a style sheet like

<Link href="" rel="stylesheet">

2) Blank script reference

<script src="" language="javascript/>

3) Broken important html tags, like <img> without </img> or empty source attributes for image, or background color

4) missing ";" after a css class statement like

.href
{
color:black
}

(there should be semicolon after black, and a "." before the class name href)

... and so on.

Be careful when you code html, in Firefox. A small mistake can cause it to behave wierdly. FF will distort styles, if you dont specify the parmaeters properly, or there is insufficient space to draw. Also, it will load the page twice, silently if there are any errors (like mentioned above)... and this can cause your application to behave wierdly.
 
Reply With Quote
 
shailpatel83 shailpatel83 is offline
Junior Member
Join Date: Jun 2009
Posts: 9
 
      04-02-2010
I am aware of following two things.

If you have img control with empty string assigned to src attribute.
<img src=””/>
<asp:image runat=”server” id=”img”/>
You may be forgot to assign imageurl or wanted to assign imageurl in code behind based on the some condition and that condition never gets executed and ended up being empty string assigned to src attribute when ASP.Net renders the page.

If you have empty string assigned to href attribute to html link for stylsheet.
<link rel=”stylesheet” href=””/>

If you have empty src attribute set to script.
<script src=”” type=”text/javascript”>

for more information you can read my post.
patelshailesh.com/index.php/page_load-event-fires-twice-with-firefox-only
 
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
CodeBehind But Not Postback - Page_Load fires twice =?Utf-8?B?RXJpayBKZW5zZW4=?= ASP .Net 4 07-21-2005 08:16 PM
Page_Load Event Fires Twice When Sending Down a PDF Jay Douglas ASP .Net 7 01-10-2005 05:05 PM
Page_Load Event fires twice....sometimes! doobdave ASP .Net 3 12-17-2004 06:56 PM
Page_Load event fires twice in asp.net (C#) ? Jon ASP .Net 1 01-13-2004 02:49 PM
Page_Load fires twice H Branyan ASP .Net 0 10-22-2003 09:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57