putting asp:Textbox in a asp:Table cell?

  • Thread starter Thread starter Ed West
  • Start date Start date
E

Ed West

Hello,

How can I put a textbox control into a cell of an asp:Table? I was not
able to do it from the properties sheet, so I put it in via html tab,
but now I can't select it from the Design tab (nor select it from the
Properties tab on the right). Any ideas?

<asp:Table id="Table1" runat="server">
<asp:TableRow>
<asp:TableCell Text="Email:"></asp:TableCell>
<asp:TableCell>
<asp:TextBox id="email" MaxLength="50"
runat="server"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>

thanks
 
Ed, I don't think there is a way to do this easily in the designer. Unless
you specifically need to use the asp:table I'd stick to standard html table
tags as this is more efficient (less server side processing going on to
render the page) and you get to edit the table cell contents easily in the
designer. In this case your code below would become:

<table>
<tr>
<td>Email</td>
<td>
<asp:textbox id="email" maxlength="50" runat="server"></asp:textbox>
</td>
</tr>
</table>
 
Back
Top