image webform control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tina

    #1

    image webform control

    I am trying to adjust the size of an image web control but if I try to say
    myimage.height = 200 it says that an integer cannot be converted to a
    webcontrol unit. I also tried a ctype cast but that didn't work either. Is
    there a way to change the size at run time?

    I need to do this because the control distorts the aspect ratio of a .jpg
    file to fit the design time size of the control. I'm trying to set it to
    the size of the jpg width and height.
    Thanks,
    T


  • Steve C. Orr, MCSD

    #2
    Re: image webform control

    Try this:

    myimage.height = System.Drawing. Unit.Pixel(200)

    Here's more info:
    http://msdn.microsoft.com/library/de...pixeltopic.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD




    "Tina" <tinamseaburn@e xcite.com> wrote in message
    news:%23cNkcJ7V DHA.1928@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > I am trying to adjust the size of an image web control but if I try to say
    > myimage.height = 200 it says that an integer cannot be converted to a
    > webcontrol unit. I also tried a ctype cast but that didn't work either.[/color]
    Is[color=blue]
    > there a way to change the size at run time?
    >
    > I need to do this because the control distorts the aspect ratio of a .jpg
    > file to fit the design time size of the control. I'm trying to set it to
    > the size of the jpg width and height.
    > Thanks,
    > T
    >
    >[/color]


    Comment

    Working...