Thursday, March 22, 2012

working with uploaded images

Hi there

I'm working on a form that uploads images (they eventually get loaded to a database). I've created a directory and then subfolder (myimages) to hold the uploaded images.

I can determine on upload if the pictures are too large and/or of the right type (jpg, gif). So far so good.

Now the frustrating part....... :eek2:

I can get the dimensions of the uploaded picture as single or integer (creating a bitmap representation and getting width & height).

I feel really stupid (noobie issues), but how do I assign height and width to an image control on the form - It's in units.

Be Kind and thank you!Might sound a little simple, but why do you need to set its height and width? Shouldn't the image show up in its original size automatically?

Second, the image control does have a height and width property.
Example:

Me.imgDept.Height = New WebControls.Unit(25)
mendhak

Thanks for the reply!

WebControls.Unit() seems to want to be passed an integer (integer value to represent a # of pixels), but #@.*! it won't take it. Maybe its a Visual Studio thing? Says units can't be converted to integer right after it asks for one! :confused:

Anyway, I'll figure out a workaround in the design.

Thanks Again
What code did you try? Did you see my second post?

0 comments:

Post a Comment