Image size

D

Dan

I have a folder with various images which are updated (externally)
periodically and a web page with an image control, text and user control
buttons. Depending on the users actions, I want to display a picture and
associated text. It all works fine except that the pictures are distorted to
fill the image control.

Is there any way I can display the picture in its original proportions
without externally resixing each picture to the dimensions of the image
control?

Thanks for your help.

Dan
 
H

Herfried K. Wagner [MVP]

Dan said:
I have a folder with various images which are updated (externally)
periodically and a web page with an image control, text and user control
buttons. Depending on the users actions, I want to display a picture and
associated text. It all works fine except that the pictures are distorted
to fill the image control.

Is there any way I can display the picture in its original proportions
without externally resixing each picture to the dimensions of the image
control?

Set the image control's 'SizeMode' property to 'AutoSize'.
 
D

Dan

Should have said that this is in Web Forms.....no picturebox control and no
SizeMode property that I can see.

Dan
 
K

Ken Tucker [MVP]

Hi,

If you leave the image's height and width properties blank the
picture will auto size. You might have to look in the html portion of the
form and delete the height and width of the asp:image manually. Hope this
helps.


Ken
-------------------
Should have said that this is in Web Forms.....no picturebox control and no
SizeMode property that I can see.

Dan
 
D

Dan

That worked. Thanks.

dan
------------------------------------
Ken Tucker said:
Hi,

If you leave the image's height and width properties blank the
picture will auto size. You might have to look in the html portion of the
form and delete the height and width of the asp:image manually. Hope this
helps.


Ken
-------------------
Should have said that this is in Web Forms.....no picturebox control and
no
SizeMode property that I can see.

Dan
 

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

Top