Modal Popup flash

D

DavidC

I added a modal popup to my asp.net page and it works great. However, every
time I open the page the modal popup panel flashes and then disappears. I am
using framework 3.5 and wondered how I can avoid the flash when opening the
page. Thanks.
 
G

Guest

I added a modal popup to my asp.net page and it works great. However, every
time I open the page the modal popup panel flashes and then disappears. I am
using framework 3.5 and wondered how I can avoid the flash when opening the
page.  Thanks.

Are you sure that you do not show it in code behind or on the client
during page load?
 
D

DavidC

Anon User said:
Are you sure that you do not show it in code behind or on the client
during page load?
.

The Panel is not hidden when page loads. Should it be visible = false and
then the ModalPopup control will make it visible? Thanks.

David
 
C

CodeMasterRobertoM

Hi David,
I had the same problem, what you can do is set the “popupcontroid†panel to
absolute position to remove it off the screen. That will not cause the panel
to flicker during page load.


sample code
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="lnkSelectTheme"
PopupControlID="pnlThemSelector"
BackgroundCssClass="modalBackground" CancelControlID="btnCancelSelectTheme">
</asp:ModalPopupExtender>
<asp:panel ID="pnlThemSelector" runat="server" Width="200px"
BackColor="White" Style="position: absolute;
top: 200060px; left: 2200000px;">
<asp:panel ID="pnlThemeSelectorDrag" runat="server" Width="200px"
BackColor="Gray">
</asp:panel>
<asp:panel ID="pnlthemeoptions" runat="server" BackColor="White">
<asp:RadioButtonList runat="server" ID="rblThemes">
<asp:ListItem Text="Green"></asp:ListItem>
<asp:ListItem Text="Blue"></asp:ListItem>
<asp:ListItem Text="Purple"></asp:ListItem>
<asp:ListItem Text="Orange"></asp:ListItem>
</asp:RadioButtonList>
<span class="art-button-wrapper"><span class="l"></span>
<span class="r"></span>
<asp:Button ID="btnSelectTheme" runat="server" Text="Select"
class="art-button" OnClick="btnSelectTheme_Click" />
</span><span class="art-button-wrapper"><span
class="l"></span><span class="r"></span>
<asp:Button ID="btnCancelSelectTheme" runat="server"
Text="Exit" class="art-button" />
</span>
</asp:panel>
</asp:panel>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top