We help IT Professionals succeed at work.

Error with TextBox control in the Table cell.

Alex A
Alex A asked
on
Medium Priority
317 Views
Last Modified: 2008-02-26
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.
Comment
Watch Question

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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Commented:
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>

Author

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.

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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.