Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ASP.NET
<tr>
             <td colspan="2" style="height: 80px; text-align: center; background-color: #BDBDBD;">
                 <h1>WebSite Header
                     <asp:LinkButton ID="LinkButton1" runat="server">Login</asp:LinkButton>
                     <asp:ModalPopupExtender ID="LinkButton1_ModalPopupExtender"  BackgroundCssClass="modalBg"
                         runat="server"
                         Enabled="True"
                         TargetControlID="LinkButton1" PopupControlID="Panel1" CancelControlID="Cancelbtn"
                          OkControlID="LoginButton"   ></asp:ModalPopupExtender>
                 </h1>
             </td>
             <td>
                 <asp:Panel ID="Panel1" runat="server"  CssClass="modalPanel" Style="display: none">
                     <table style="border-collapse: collapse;">
                         <tr>
                             <td>
                                 <table>
                                     <tr>
                                         <td style="text-align: center;" colspan="2">Log In</td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: right">
                                             <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                                         </td>
                                         <td>
                                             <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                             <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: right">
                                             <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                         </td>
                                         <td>
                                             <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                             <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td colspan="2">
                                             <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />
                                         </td>
                                     </tr>
                                     <tr>
                                         <td colspan="2" style="color: Red; text-align: center">
                                             <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                         </td>
                                     </tr>
                                     <tr>
                                         <td style="text-align: right" colspan="2">
                                             <asp:Button ID="LoginButton" runat="server" Text="Log In" ValidationGroup="Login1" />
                                         </td>
                                         <td>
                                             <asp:Button ID="Cancelbtn" runat="server" Text="Cancel" />
                                         </td>
                                     </tr>
                                 </table>
                             </td>
                         </tr>
                     </table>
                 </asp:Panel>

             </td>
         </tr>
Posted
Comments
What have you tried?
raj1990m 13-Feb-14 23:31pm    
i created Login and Register Screen.when user clicks the login and register page.it will open in ajax modal popup window...how to register and login using modal popuup window

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900