Wednesday, March 21, 2012

ModalPopup and ASP:Panel

Hi

I've used a modalpopup to display an asp:panel which is working fine. The problem is the panel briefly flashes on the page then disappears. I don't want this. I can gewt rid of this effect if I set the panel visible property to false but then the popup wont work, if it's true then it does work.

Can anyone tell me why or how to get around it

Cheers
Jon

Hello Jon,

I am having the same problem with other Toolkit controls. It seems to be a small thing but it gets annoying! There must be something simple to stop this behaviour.

The only comparison between us is the panel. I wonder if it is something to do with the panel and the toolkit. If i find anything then I will let you know.

Sorry I am not replying with an answer but I think it is good to find someone else with the same problem.


Hello John,

I have found the answer for my problem so hopefully it will help you. I had a thought that i hadn't seen this behaviour in the toolkit live samples so had a look at the sample website code for my specific component and it looks like you need to put the following into your panels CSS or in the style:

<asp:panel id="panTest"style="display:none; visibility:hidden;"

It has worked from me and now I cannot see an annoying flash :)

I hope it works for you.


Hello again,

Actually you cannot add it to a stylesheet. It has to be added directly to the panel on the page for it to work. I added it to the stylesheet and it would not show the panel at all.


I was not able to get it to work when style includes visibility:hidden

<asp:Panelrunat="server"ID="Panel1"CssClass="modalPopup"style="display:none;visibility:hidden;">

But this worked

<asp:Panelrunat="server"ID="Panel1"CssClass="modalPopup"style="display:none;">


Thanks Guys! Had the same problem and this solved it.


Thanks! I have solved it!

No comments:

Post a Comment