Problem with cell with in a table

G

Guest

I have started using a System.Web.UI.WebControls.Table control

In this table I have programmatically added web controls (mostly textboxes)
to all the cells of a particular column. (The entire table is defined in the
VB code.)

Nothing I do seems to affect the width of the column or the textboxes within
the column. I have tried adding to the attributes of both the textbox and
the cell. (Attributes.Add("Width", "50px").

What am I forgetting?
 
G

Guest

B Chernick
Look in the html rendered to the browser for <td width="50px"> to verify
your getting the correct output.

both the tablecell and htmltablecell have a width attribute you can use and
both are used differently.

tablecell.width = new unit(50)
htmltablecell.width = "50px"

Have a great weekend.
DWS
 
G

Guest

Thanks. I've got it now.

(Wrong call. For some reason I was using Attributes.Add rather than a
straightforward .Width=Unit.Pixel(50) on the control itself.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top