Avatar of John Carney
John Carney
Flag for United States of America

asked on 

Resizing a login control in Visual Web Developer

I'm trying to put a standard login control into  the header of an aspx page. If I convert it to a template I can make some style changes but I'd like to be able to style it further, so that it looks like this page:  http://dijitalrealm.com/RegistrationWLogin.html (Ignore the fact this page is narrower)

Below is the VWB default code, and here is what it looks like left as is: http://dijitalrealm.com/default2.aspx  Not horrible, but I would just like to have a little more control over it.

I thought maybe I could re-code it in Dreamweaver and paste the table code into my aspx doc but here's what it looks like when I do that: http://dijitalrealm.com/default3.aspx 

So I guess the question is, how do I modify the code below so that I have complete control over the way it looks.

Let me know if this is too confusing and I'll take another shot at it.

Thanks!

John

<asp:Login ID="Login1" runat="server" style="color:White">
        <LayoutTemplate>
            <table border="0" cellpadding="1" cellspacing="0" 
                style="border-collapse:collapse;">
                <tr>
                    <td>
                        <table border="0" cellpadding="0">
                            <tr>
                                <td align="center" colspan="2">
                                    Log In</td>
                            </tr>
                            <tr>
                                <td 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 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 align="center" colspan="2" style="color:Red;">
                                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" colspan="2">
                                    <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" 
                                        ValidationGroup="Login1" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:Login>

Open in new window

.NET Programming

Avatar of undefined
Last Comment
John Carney

8/22/2022 - Mon