Community discussion forum

UpdatePanel page hangs when hiding a div...

  • 1 year ago

    Hello,

    Here is a VERY cut down version of my page code.

    HTML

     In the server code behind, the dropdown list is populated on load. On change, the server side code hides the DIV, the resulting page is never rendered on the client side...

    Interestingly, if the div hasn't got the databound object in it then it works fine. Also, predictably, if I take away the updatepanel then then div hide etc works just fine.

    VB Code

    Any ideas anyone?

    Thanks in advance.

    Tom

     

  • 1 year ago
    Hi, Using an updatepanel might not be the solution you are after. The updatepanel only provides a way to do a postback without actually posting back the whole page. You can probably achieve the same effect using a client callback and some javascript. Regards Simon C
  • 1 year ago
    Hi, I am aware of the alternatives, thanks. I was mainly pointing out a frustrating shortfall of the update panel and asking if anybody knew a way to avoid it.... Thanks for the response though. :-) Tom.
  • 1 year ago
    Hi, Sorry - just testing this functionality as the last two messages seem to have been broken.
  • 1 year ago
    As an aside to developerfusion. If you are going to resize the images to fit them into the thread width, could you do it so that you maintain the aspect ratio as right now the two images above are illegible unless somebody copies the image url out and pastes it into a seperate window. (Aside from that, I like the new look.)
  • 1 year ago
    Hi Tom, That's definitely possible with the UpdatePanel. Is a simpler scenario working as expected for you? (ie just a standard ajaxified postback from a button submission)?
  • 1 year ago
    I've also just updated the stylesheet so it will just chop off the images rather than attempt to resize it. Do let me know if you have any other feedback! :)
  • 1 year ago
    Hi James, I have been using UpdatePanels for quite a while. This issue is ONLY when you are trying to hide a div that includes a databound dropdown list (or any other databound control *) If you have a div with plain HTML then this hides with no problem. If you have a dropdown list without being databound then this also hides with no problem. All I would ask is that you open a new project. Copy my code and see what happens... It's strange.. Thanks Tom.
  • 1 year ago
    Turns out I am a chump. The updatepanel itself was fine. It was just a victim of its own bloat. The dropdown list, you see, was quite long - a couple of thousand options - and this was being bandied about in the viewstate as is AJAXs won't.... Bottom line. Don't use update panels when you are playing with large amounts of data - or even medium amounts for that matter. Learn js and do it on the client side. Tom.
  • 1 year ago
    Ahhhhh. Thanks for the update Tom! Sorry we couldn't be of much help on that one :)

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!