Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Image.Height, how to set this property

Reply
Thread Tools

Image.Height, how to set this property

 
 
=?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
Guest
Posts: n/a
 
      01-28-2005
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
 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      01-28-2005
have you tried:

Image1.Height = Unit.Pixel(150)

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

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


"Kurt Schroeder" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
Guest
Posts: n/a
 
      01-28-2005
it figures...........
thanks!!!!
kes

"Karl Seguin" wrote:

> have you tried:
>
> Image1.Height = Unit.Pixel(150)
>
> alternatives are
> Unit.Point(x)
> and
> Unit.Percentage(x)
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "Kurt Schroeder" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<value> could not be set on property <property name> TonyDyer General Computer Support 0 02-14-2012 03:25 PM
DataBinder.Eval for an object's property property... like Eval(Container.DataItem,"Version.Major") Eric Newton ASP .Net 3 04-04-2005 10:11 PM
Set CSS property equal to another CSS property? Noozer HTML 10 10-13-2004 09:20 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM
'property value' could not be set on property 'propertyname' KJ ASP .Net Web Controls 0 08-26-2003 06:08 PM



Advertisments