Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai
in my website ,i have to block and hide tr tag with inside text box and label,when i refresh page inside control not fit into correct position,that is it comes next line.but in page load it will correctly fix.

my html code is
ASP.NET
<tr id="email" style="display: block"  runat="server">
<td style="width: 22%">
<asp:Label ID="Label46" runat="server" Text="Email Account" CssClass="font12"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtEmailAc" runat="server" CssClass="font12" Width="160px"></asp:TextBox>
</td>
</tr>

<tr id="pass" style="display: block;"  runat="server">
<td style="width: 22%">
<asp:Label ID="Label47" runat="server" Text="Email Password" CssClass="font12"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtEmailPass" runat="server" Width="160px" CssClass="font12" onkeyup="MainPass()" onchange="MainPass()" TextMode="Password"></asp:TextBox>
</td>
</tr>


and server side code is
VB
Dim usercred As String = "False"
        If row("Email").ToString = "True" Then
            usercred = "True"

            email.Attributes.Remove("style")
            pass.Attributes.Remove("style")

        Else
            email.Attributes.Add("style", "display:none;")
            pass.Attributes.Add("style", "display:none;")
        End If



pls reply asap

Regards
Aravind
Posted
Updated 18-Nov-13 14:55pm
v4
Comments
ZurdoDev 18-Nov-13 21:58pm    
You'll need to view source to see what is happening.

1 solution

if i remove style from tr tag it will work correctly.that is style="display: block;"
 
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