Coffeehouse Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

UpdatePanels vs. IE6/7 - Danger Danger!

Back to Forum: Coffeehouse
  • User profile image
    jsampsonPC

    Updatepanels have truly been an interesting thing to play with lately. Especially in conjunction with IE - the results are often-times devastating to the browser.

    Last week I had a problem where responses from the server would freeze my entire browser when coming through an updatepanel. Not just the page, I mean, my ENTIRE browser. It would require a ctrl+alt+del to get back up and running.

    The solution? I told the server to wait 100ms before sending the response. That "fixed" it, so I cut it down to 50ms, worked, down then to 1ms, worked. Then our of curiosity I put it to 0ms, and oddly enough, it still worked - no more crashing browser, the response would wait 0ms before getting fired off.

    Today, I found yet another interesting thing with my updatepanel. I'm able to have two radio-buttons within the same group selected in IE 6 and 7 - Not FF2. How is this possible? I have no idea. Once you select a different radio button in the group, it deselects the previous two, and will no longer let you have two selected again.

    I have a list of products, when you click one, my updatePanel loads in about a dozen form objects, and selects certain values from the database based upon previous sessions with the user.

    What I do with my form is I run through values from a database, and select a default radio button for a group, then I check the user-values, and select any radio button they already seleted in a previous session - as the result comes through to the user, they see both the default radio button selected, and the radio option they last selected.

    Wow...what a world. I've managed to keep IE7 from crashing by holding my response for 0ms before sending it off, and I've managed to get two radio buttons selected by building the form asynchronously through an updatepanel.

  • User profile image
    MB

    I spent a fair while futzing about with ajax.net before deciding that it was either too brittle (particularly with the jscript in IE) or I was simply too stupid (I'm leaning strongly towards that one) for me to use it in my production sites, and started hunting about for alternate "wrapper" solutions.

    I settled on Telerik’s ajax solutions, which they’ve recently been updating to their “Prometheus” release (son of Ajax, or something like that) and it just makes my life so much easier. Pretty much “Ajax for Dummies” which suits me just fine... and I can get stuff to work X-Browser/X-Platform with relative ease... albeit at a $cost and some acceptable (to me) performance/functionality trade-offs.

  • User profile image
    asheeshsoni

    I am having the same problem where responses from the server would freeze my ENTIRE BROWSER when coming through an updatepanel. Its only a problem in IE. IE7 freezes for 2 minutes, and then works fine. IE8 Beta only hangs for 6-7 seconds before resuming.

    Firefox, as always, works like a charm. Blazing fast! Doesn't hang at all. And Loads the page instantly. ( + 1 Second for the 1st tab + 3 seconds for the remaing 8 tabs).

    I tried System.Threading.Thread.Sleep(1); on the server (Page_Load) but to no avail.

    Could you please elaborate on how you fixed it?

    BTW, I am already running the app in Debug=False, Script Mode = "Release", Script compression = "True", Script Caching = "True".

    In my application, I have a Ajax Toolkit Tab Control and I use Multiview to first load the page (without any Tab Contents), then, using a Timer, load the contents of the first Tab. And then, with another Timer, Load the remaining Tabs in one go.

    Each tab contains around 50 - 100 CascadingDropDowns.
    I know people would tell me to rethink the design and tell me I shouldn't be loading so many CascadingDropDowns on one page (10 Tabs x 100 Set of CascadingDropDowns x 4 DropDowns in each set = 4000 DropDowns with each DropDownList = approx 50 Entries)

    I only use UpdatePanel for the initial incremental load of the page. Otherwise, the page never posts back. Its all implemented using WebMethods wrapped in Custom Extenders. And these WebMethods use Get Requests instead of Post to make them Browser Cachable (and Versionable using query string params). (Security is not an issue here Smiley  )

    The business doesn't want to divide the tabs as separate pages or wait for a round trip to the server when switching tabs. And with IIS Compression enabled, bandwidth is not a problem because this 2MB beast is reduced to a 60Kb page.

    I can't use Firebug to debug because its only happening in IE.
    I used PageRequestManager's events and found out that in PageRequestManager.PageLoading, IE7 hangs for 2 minutes just after loading the page (i.e., injecting the response XML into the DOM) and running all the scripts / behaviours of the CustomExtenders.

    Firefox straight away fires the PageRequestManager.PageLoaded event after the scripts on the Delta page (from ASyncPostback) complete. But IE hangs for 2 minutes after loading the delta page and running the scripts.

    Any ideas?
    Just wondering if your "delayed response from server" hack would work.

    Thanks

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.