Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

In my Web page,I have a Div section with height=302PX and width=302PX.

In another page,I had a File Upload control. When we will upload the image,then the image will be displayed in that Div section.

1.When the image is large,it should be re-size and display in that particular Div section completely.

For Eg:The image size like 350PX*350PX and 1024PX*1024PX, it should be re-size to Div Section size has 302PX*302PX.

2.When the image is Small,it shouldn't be re-size and display in that particular Div section completely.

For Eg:The image size like 50PX*50PX,100PX*100PX and 302PX*302PX ,it shouldn't be re-size and display in that Div section.

For Eg:The image size like 15PX*15PX these will appear very small.But When uploading the file these images also should displayed

completely with as it is in that Div section.But the image will displayed neatly.

3.If there are any tools for these type of conditions using ASP.Net.

Plz reply me ASAP.
Posted
Comments
R. Giskard Reventlov 18-Aug-12 10:52am    
HAve you actually tried anything for yourself?
Yashwanths 20-Aug-12 0:37am    
Yes,I had tried,but I am not getting what I want.So,I had post the question.
For re-sizing,I had the code.While coming to the small images I can't understand
Sergey Alexandrovich Kryukov 18-Aug-12 13:43pm    
Not enough information. A code sample would be a whole more useful.
--SA

1 solution

I am not sure if HTML can do this. You want a 'max size' but not a size. I'd suggest a HTTP handler to serve images, which makes sure they are not above a certain size, then you can show them with limited HTML that does not impose size restrictions.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900