Error with TextBox control in the Table cell.

I am moving all control on the page in the web table control. Everything ok with labels and radio buttons, but multiline text box causes an error in design mode: 'Error Creating Control - Table1'.

<asp:TableRow>
       <asp:textbox id="Textbox1" runat="server" Width="376px" TextMode="MultiLine" Height="152px"></asp:textbox>
</asp:TableRow>

Anybody knows why and how to get around it? Thanks.
quasar_eeAsked:
Who is Participating?
 
nauman_ahmedCommented:
It should be like this:

<asp:TableRow>
<asp:TableCell>
<asp:textbox id="Textbox1" runat="server" Width="376px" TextMode="MultiLine" Height="152px"></asp:textbox>
</asp:TableCell>
</asp:TableRow>

Plus any reason you wanted to use server side tables instead of HTML tables?

-Nauman.
0
 
ptleitchCommented:
put it in a cell as well

<asp:Table ID="Table1" runat="server">
<asp:TableRow>
    <asp:TableCell>
    <asp:textbox id="Textbox1" runat="server" Width="376px" TextMode="MultiLine" Height="152px" />
    </asp:TableCell>
</asp:TableRow>

    </asp:Table>
0
 
quasar_eeAuthor Commented:
Thanks, I forgot to create a cell.

<
Plus any reason you wanted to use server side tables instead of HTML tables?

>

What are advantages of using HTML Table instead of the server side table? I am thinking about moving everything into HTML Table.

0
 
nauman_ahmedCommented:
There is not much difference. However, Table Web server control has more sophisticated functions. In most of the cases, you Html table control having runat=server and id will do the job. Following is a good article that has discussed its differences:

Table, TableRow, and TableCell Web Server Controls
http://www.developerfusion.co.uk/show/4410/3/

-Nauman.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.