Wednesday, March 21, 2012

ModalPopup - content shows briefly when page loads

Hi,

I have a some problem with the modalpopup control. Its on everytime a full postback happens, the browser "displays" all the content of my modalpopup, in way that how it's going to look like when you dont add the extender to your panels. The panels then "disappear" after the page is loaded, and the modalpopups work as they are supposed to.

how do i prevent the panels from "blinking"/showing on full page postbacks?

Add style="display:none;" to the panels.


this seems to work. thanks!

however i have one question. before, I was adding display:none; to my panels through the css class on a separate css file. it wouldnt work that way since the panels will disappear forever. it only works when i put display:none; on the <asp:Panel> from the html source. why is it like that?


I believe that the modalpopup works by toggling the style attribute but if you have display:none permanently set in the CSS then it isn't going to work. Bit of a pain I know but not a huge deal to add it to the panel.

No comments:

Post a Comment