row height in dynamic asp:table

H

hansiman

Why can't I set height of a table row in the code:

tRow.Height = "35"

or

tRow.Height = 35

both fails?

/M
 
K

Ken Dopierala Jr.

Hi,

You need to specify it in units:

tRow.Height = Unit.Pixel("35")

Good luck! Ken.
 
H

hansiman

thanks, but ...

even if I state "Imports System.Drawing"

tRow.Cells = Unit.pixel(35)

fails

The examples in VS seem only to imports System.Drawing

/M
 
K

Ken Dopierala Jr.

Hi,

It isn't in System.Drawing. If you hover your mouse over the error it
should tell you the namespace. Try:

tRow.Height = System.Web.UI.WebControls.Unit.Pixel("35")

Also in your code below you are trying to set Cells to a height. You can't
do that, Cells is a read-only property. Good luck! Ken.
 

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,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top