Advertisement

03.25.2008 at 06:40AM PDT, ID: 23266907
[x]
Attachment Details

ajaxToolkit:ModalPopupExtender in a user control Pop-up control disappears?

Asked by adworldmedia in .NET Framework 3.x versions, Programming for ASP.NET, Visual Studio 2008

Tags: asp.net 3.5 ajax toolkit, IE Firefox

I'm writing a login user control in C# using asp.net 3.5 with the Ajax Toolkit's ModalPopUExtender to allow the user to click a login link that will then display a modal pop-up with the login information in it.  

In the user control, I have a Panel that I make "hidden" via CSS which includes all the pertinent info to login; and then outside of this panel I have a linkbuton that invokes the pop-up login box.  

When I place this user control on a page, the Linkbutton displays for a split second, then disappears.  I'm not sure why its doing this, I don't have any CSS that makes it go away...

Please advise?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="login.ascx.cs" Inherits="modules_login" %>
<asp:LinkButton ID="loginClick" runat="server" CausesValidation="false">Login</asp:LinkButton>
<asp:Panel ID="panelLogin" runat="server" 
    style="display:none;height: 100px; width: 270px; background-color:black;color: #FFFFFF;  margin:10; padding:10px;" 
    Width="286px">
<h1 style="text-align: center">
    Login Options</h1>
<table align="center" style="color:White;">
    <tr>
        <td>
            Email Address:</td>
        <td>
            <asp:TextBox ID="txtLoginEmail" runat="server" Width="180px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            Password:</td>
        <td>
            <asp:TextBox ID="txtLoginEmail0" runat="server" Width="180px"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
<div align="center"><asp:Button ID="btnLogin" runat="server" Text="Login" 
        onclick="btnLogin_Click" />&nbsp;<asp:Button ID="btnCancel" runat="server" 
        Text="Cancel" />
    <br />
    <asp:LinkButton ID="btnRegister" runat="server">Register</asp:LinkButton>
&nbsp;<asp:LinkButton ID="btnForgotPassword" runat="server">Forgot Password</asp:LinkButton>
</div>
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="panelLogin_ModalPopupExtender" 
    runat="server" TargetControlID="panelLogin" CancelControlID="btnCancel" PopupControlID="loginClick"
    BackgroundCssClass ="modalBackground">
</ajaxToolkit:ModalPopupExtender>
[+][-]03.25.2008 at 07:23PM PDT, ID: 21208438

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 3.x versions, Programming for ASP.NET, Visual Studio 2008
Tags: asp.net 3.5 ajax toolkit, IE Firefox
Sign Up Now!
Solution Provided By: adworldmedia
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628