image webform control

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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


    Tina Guest

  2. Similar Questions and Discussions

    1. Help: ASP.NET Webform using VB.NET User Control
      I created a VB.NET user control which uses a nonmanaged ActiveX control. I built it as 'mycontrol.dll'. In my ASP.NET webform I'm trying to add...
    2. How do I make my control show up in the webform?
      I built my control. It shows up and works at runtime. But at design time, it does not show up on the page. How do I make it show on the page at...
    3. does webform control equal to asp.net control?
      If no, could you show me the differentia? thanks, ThxBruin
    4. Including WebForm Image Control in a Webform Table Control
      What is the code for including an image control in a Table control of a WebForm ???? regards
    5. HELP: ActiveX Control on webform
      I am going to use an ActiveX control on my webform. 1. How can I set it up so that if a user views the web page and doesn't have the ActiveX...
  3. #2

    Default Re: image webform control

    Try this:

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

    Here's more info:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsunitclasspixeltopic.asp[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]



    "Tina" <tinamseaburn@excite.com> wrote in message
    news:%23cNkcJ7VDHA.1928@TK2MSFTNGP12.phx.gbl...
    > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139