• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 582
  • Last Modified:

Editing Login Control text

I've got a login control that I want to add text to.  There's a big white space between the "Please Login" tab and he Username label.  I want to be able to add a simple "Please enter your username and password to continue" but all I get in design view is a td, and when I try to insert text into there, the text fills up the cell but doesn't give me just a horizontal sentence.  The text just ends up scrolling down after a few words.  How can I add text in the whitespace to display horizontally and right above the username label?
<asp:Login ID="Login1" runat="server" BorderColor="#B5C7DE" BorderPadding="4" 
                           BorderStyle="Solid" Height="154px" Width="324px" BackColor="#EFF3FB" 
                      BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333" 
                      LoginButtonText="Login" DisplayRememberMe="False" 
                    TitleText="Please Login">
               <CheckBoxStyle HorizontalAlign="Center" />
               <TextBoxStyle Font-Size="0.8em" Width="200px" />
               <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" 
                   BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
                   ForeColor="#284E98" />
               <LayoutTemplate>
                   <table border="0" cellpadding="4" cellspacing="0" 
                       style="border-collapse:collapse;">
                       <tr>
                           <td>
                               <table border="0" cellpadding="0" style="height:154px;width:324px;">
                                   <tr>
                                       <td align="left" colspan="2" 
                                           style="color:White;background-color:#507CD1;font-size:0.9em;font-weight:bold;">
                                           &nbsp;Please Login</td>
                                   
                                   <tr>
                                   <td class="style1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
                                   
                                   <tr>
                                       <td align="right" class="style2">
                                           <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User 
                                           Name:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="UserName" runat="server" Font-Size="0.8em" Width="200px"></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" class="style2">
                                           <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="Password" runat="server" Font-Size="0.8em" TextMode="Password" 
                                               Width="200px"></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 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" BackColor="White" 
                                               BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" CommandName="Login" 
                                               Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" Text="Login" 
                                               ValidationGroup="Login1" />
                                       </td>
                                   </tr>
                               </table>
                           </td>
                       </tr>
                   </table>
               </LayoutTemplate>
               <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
               <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" 
                   ForeColor="White" HorizontalAlign="Left" />
                  </asp:Login>

Open in new window

screenshot004.jpg
0
JeffEae
Asked:
JeffEae
1 Solution
 
Praveen VenuCommented:
reduce that heights from 154 to around 130
0
 
JeffEaeAuthor Commented:
Hey prav,

Just tried that, it still does the same thing in the td.  Here's a screenshot.  How do I make that text horizontal?
screenshot005.jpg
0
 
Praveen VenuCommented:
its just a simple mistake.. You missed the colspan

adjust this line as this

                   
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
JeffEaeAuthor Commented:
It still does the same thing, even with the colspan added.  
 <asp:Login ID="Login1" runat="server" BorderColor="#B5C7DE" BorderPadding="4" 
                           BorderStyle="Solid" Height="130px" Width="324px" BackColor="#EFF3FB" 
                      BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333" 
                      LoginButtonText="Login" DisplayRememberMe="False" 
                    TitleText="Please Login">
               <CheckBoxStyle HorizontalAlign="Center" />
               <TextBoxStyle Font-Size="0.8em" Width="200px" />
               <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" 
                   BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
                   ForeColor="#284E98" />
               <LayoutTemplate>
                   <table border="0" cellpadding="4" cellspacing="0" 
                       style="border-collapse:collapse;">
                       <tr>
                           <td>
                               <table border="0" cellpadding="0" style="height:130px;width:324px;">
                                   <tr>
                                       <td align="left" colspan="2" 
                                           style="color:White;background-color:#507CD1;font-size:0.9em;font-weight:bold;">
                                           &nbsp;Please Login</td>
                                   
                                   <tr>
                                   <td class="style1" colspan="2">Please enter your username and password to continue</td>
                                   
                                   <tr>
                                       <td align="right" class="style2">
                                           <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User 
                                           Name:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="UserName" runat="server" Font-Size="0.8em" Width="200px"></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" class="style2">
                                           <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="Password" runat="server" Font-Size="0.8em" TextMode="Password" 
                                               Width="200px"></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 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" BackColor="White" 
                                               BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" CommandName="Login" 
                                               Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" Text="Login" 
                                               ValidationGroup="Login1" />
                                       </td>
                                   </tr>
                               </table>
                           </td>
                       </tr>
                   </table>
               </LayoutTemplate>
               <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
               <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" 
                   ForeColor="White" HorizontalAlign="Left" />
                  </asp:Login>

Open in new window

screenshot006.jpg
0
 
tiagosalgadoCommented:
I've past your code in a page and render correctly. Maybe you have some other style making some unwanted at that place.
0
 
EspavoCommented:
You are opening, and not closing <tr>'s...
Try this...

<asp:Login ID="Login1" runat="server" BorderColor="#B5C7DE" BorderPadding="4" 
                           BorderStyle="Solid" Height="130px" Width="324px" BackColor="#EFF3FB" 
                      BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333" 
                      LoginButtonText="Login" DisplayRememberMe="False" 
                    TitleText="Please Login">
               <CheckBoxStyle HorizontalAlign="Center" />
               <TextBoxStyle Font-Size="0.8em" Width="200px" />
               <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" 
                   BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
                   ForeColor="#284E98" />
               <LayoutTemplate>
                   <table border="0" cellpadding="4" cellspacing="0" 
                       style="border-collapse:collapse;">
                       <tr>
                           <td>
                               <table border="0" cellpadding="0" style="height:130px;width:324px;">
                                   <tr>
                                       <td align="left" colspan="2" 
                                           style="color:White;background-color:#507CD1;font-size:0.9em;font-weight:bold;">
                                           &nbsp;Please Login</td>
                                   </tr>
                                   <tr>
                                   <td class="style1" colspan="2">Please enter your username and password to continue</td>
                                   </tr>
                                   <tr>
                                       <td align="right" class="style2">
                                           <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User 
                                           Name:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="UserName" runat="server" Font-Size="0.8em" Width="200px"></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" class="style2">
                                           <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                       </td>
                                       <td>
                                           <asp:TextBox ID="Password" runat="server" Font-Size="0.8em" TextMode="Password" 
                                               Width="200px"></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 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" BackColor="White" 
                                               BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" CommandName="Login" 
                                               Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" Text="Login" 
                                               ValidationGroup="Login1" />
                                       </td>
                                   </tr>
                               </table>
                           </td>
                       </tr>
                   </table>
               </LayoutTemplate>
               <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
               <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" 
                   ForeColor="White" HorizontalAlign="Left" />
                  </asp:Login>

Open in new window

0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now