System.Web.UI.HtmlControls.HtmlImage

D

Dave.NET

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top