Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Page_Load fires twice with Mozilla (http://www.velocityreviews.com/forums/t91202-page_load-fires-twice-with-mozilla.html)

=?Utf-8?B?RWQ=?= 11-20-2004 12:33 PM

Page_Load fires twice with Mozilla
 
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


Kumar Reddi 11-20-2004 04:51 PM

Re: Page_Load fires twice with Mozilla
 
Hi Ed,
check to see if you have AutoEventWireup set to true in the Page
directive

Kumar

"Ed" <ed_atwell@noemail.noemail> wrote in message
news:C73265EF-E329-460D-A23F-A7C14886DF58@microsoft.com...
> 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
>




=?Utf-8?B?RWQ=?= 11-20-2004 05:19 PM

Re: Page_Load fires twice with Mozilla
 
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" <ed_atwell@noemail.noemail> wrote in message
> news:C73265EF-E329-460D-A23F-A7C14886DF58@microsoft.com...
> > 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
> >

>
>
>


Greg Johnson 12-01-2004 04:28 PM

Re: Page_Load fires twice with Mozilla
 
> 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?

=?Utf-8?B?RWQ=?= 12-07-2004 10:35 AM

Re: Page_Load fires twice with Mozilla
 
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?
>


drogovoy 06-03-2009 10:02 PM

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

nkindia 09-02-2009 10:23 PM

Firefox will reload the page automatically, if
 
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.

shailpatel83 04-02-2010 04:01 PM

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


All times are GMT. The time now is 10:16 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.