Page_Load, called in Firefox but not IE

I was thrown into an ASP.NET project, and I have a page containing a control that is retrieved through AJAX.

The control's Page_Load function does some of the logic needed to get the correct values ​​from the Query string.

The problem is that the Page_Load function is not called in IE.

If I set a breakpoint, I can load the page in FF and see its stop, but in IE: there is no deal.

I'm pretty (read: TOTALLY) new to ASP.NET, but I'm a pretty experienced PHP developer. So I think this is probably some kind of funk with how IE performs an AJAX callback to gain control.

Does anyone have any idea?

Greetings

+3
source share
6 answers

It seems that this was a caching problem, resolved by doing something like this:

protected override void OnLoad(EventArgs e)
{
    Response.Cache.SetNoStore();
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetExpires(DateTime.Now);
    Response.Cache.SetLastModified(DateTime.Now);
    Response.Cache.SetAllowResponseInBrowserHistory(false);
    base.OnLoad(e);
}
+5
source

Maybe try debugging javascript to see if it ever tries to get a control in IE? If you can. Better yet, see Fiddler. http://www.Fiddler2.com

+1
source

, OutputCache:

<%@ OutputCache Duration="0" VaryByParam="None" %>
+1

IE , IE, , .

script IE script.

0

Page_Load? EventWireup false ASPX, - .

0

IE8 will let you debug javascript. AFAIK, what you explain should not happen in a typical setup, because the server processes requests from all browsers in the same way. Are you sure you are sitting on the right breakpoint and on the right page?

Perhaps you could place a small page_load sample and where do you set the breakpoint, and the JS that accesses it?

For reference: ASP.NET page life cycle .

0
source

All Articles