Image.Height, how to set this property

G

Guest

I'm trying to set the height of an <asp:Image and i can seem to do it in my
code
I try Image1.Height = 150 (or "150px") VS.net says the type can not be
converted to System.Web.UI.WebControls.Unit .
I guess my real question is how to I create a value of type
System.Web.UI.WebControls.Unit?
thanks
(another simple one)
kes
 
K

Karl Seguin

have you tried:

Image1.Height = Unit.Pixel(150)

alternatives are
Unit.Point(x)
and
Unit.Percentage(x)

Karl
 
G

Guest

it figures...........
thanks!!!!
kes

Karl Seguin said:
have you tried:

Image1.Height = Unit.Pixel(150)

alternatives are
Unit.Point(x)
and
Unit.Percentage(x)

Karl
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top