Click here to Skip to main content
15,915,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
One of my Td should like Name _________________ above underline i have placed another label run time i have to assign a value to the label but when the value is on the label underline is overlapping.But my requirement is Label text should be above underline.could you please advice how do i improve this


<td class="style6">
                                                                                                                                   <asp:Label ID="namelbl" Text="Name" runat="server"
                                                                                                                                       style="font-family: 'Times New Roman', Times, serif; font-weight: 700">                      _<asp:Label
                                                                                                                                       ID="Label3" runat="server" Text="hi">
                                                                                                                                   _________________________</td>


Thanks
Posted

use "u" tag like this..

<td>
<asp:Label ID="Label3" runat="server"> <u> HI </u>
</asp:Label>
</td>

if you are bingding label text from database then you as like below..

<td>
<asp:Label ID="Label3" runat="server">
<u> '<%# Eval("YourExpression") %>' </u>
</asp:Label>
</td>


Hope this helps...
 
Share this answer
 
Comments
Lancy.net 30-Nov-11 1:20am    
Thanks karthik if i use this for example the text is Hi length of u is covering only hi my requirement is u must be longer and text center aligned in that
Hi,

I give you a simple solution for make label text underline

make it :
HTML
Font-Underline="true"


ASP.NET
<table><tbody><tr><td>
<asp:label id="Label1" runat="server" font-underline="true" xmlns:asp="#unknown">  HI 
</asp:label>
</td></tr></tbody></table>
 
Share this answer
 
Comments
Lancy.net 30-Nov-11 1:34am    
thanks for your reply
i need a line in that label should be the center aligned, sorry not underline..
HTML

style='border-bottom:1px

Solid Black; text-align: center;'
 
Share this answer
 

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