Image.Height, how to set this property

Discussion in 'ASP .Net' started by =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Jan 28, 2005.

  1. 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
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Jan 28, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=

    Karl Seguin Guest

    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" <> wrote in message
    news:...
    > 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
    Karl Seguin, Jan 28, 2005
    #2
    1. Advertising

  3. 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" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Jan 28, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=

    How to set width and height of image using HyperLink Control?

    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=, Aug 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    9,055
    =?Utf-8?B?Um9ic29uIENhcnZhbGhvIE1hY2hhZG8=?=
    Aug 8, 2004
  2. Replies:
    0
    Views:
    544
  3. muggslab

    Div Height = Image height. help

    muggslab, Feb 1, 2010, in forum: HTML and CSS
    Replies:
    1
    Views:
    855
    muggslab
    Feb 1, 2010
  4. Robson Carvalho Machado

    How to set width and height of image using HyperLink Control?

    Robson Carvalho Machado, Aug 7, 2004, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    223
    Robson Carvalho Machado
    Aug 9, 2004
  5. Don Vaillancourt

    How to tell height of div where height is not set?

    Don Vaillancourt, Jan 28, 2005, in forum: Javascript
    Replies:
    8
    Views:
    134
    Dietmar Meier
    Jan 31, 2005
Loading...

Share This Page