System.Web.UI.HtmlControls.HtmlImage

Discussion in 'ASP .Net Web Controls' started by Dave.NET, Jun 8, 2004.

  1. Dave.NET

    Dave.NET Guest

    Why are System.Web.UI.HtmlControls.HtmlImage.Width and .Height of type Int32? Straight HTML supports "###%" string values for these fields, so why are the .NET equivalents not of type String

    This is quite frustrating, as I have a need to resize an image by a percentage. But I also need to use the control as a server control. To do what I need to do, I will have to create a function that loads the image file into a System.Drawing.Image object, then read the Width and Height values, multiply by my percentage, then set the .Width and .Height values to the resultant pixel amounts. I must do this for every image I want resized by a percentage

    Is there a better way
    Does anyone know if this behavior was by design

    Thanks for letting me rant
    Dave
    Dave.NET, Jun 8, 2004
    #1
    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. szabelin
    Replies:
    0
    Views:
    451
    szabelin
    Aug 4, 2003
  2. Marco Scheel
    Replies:
    3
    Views:
    757
    Jacob Yang [MSFT]
    Nov 26, 2003
  3. Jill Graham

    Inherit from System.Web.UI.HtmlControls ??

    Jill Graham, May 9, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    444
    Teemu Keiski
    May 10, 2004
  4. Martin Eyles
    Replies:
    3
    Views:
    5,823
    Martin Eyles
    Apr 5, 2005
  5. Nathan Sokalski
    Replies:
    8
    Views:
    611
    =?Utf-8?B?Y2luZHk=?=
    May 23, 2006
Loading...

Share This Page