Click here to Skip to main content
15,885,880 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to make thumbnail of large image to small which is uploaded by user and by clicking on this image it shows the actual larger real size of image which is uploaded by user in mvc c# .
could anyone help me?

What I have tried:

how to make thumbnail of large image to small which is uploaded by user and by clicking on this image it shows the actual larger real size of image which is uploaded by user in mvc c# .
could anyone help me?
Posted
Updated 15-May-17 2:58am
Comments
F-ES Sitecore 15-May-17 9:50am    
google "resize image c#" or "make thumbnail c#" for lots of examples

1 solution

You should saved resized image along with original image after upload complete.

Say you would save uploaded image in Images/UserImages then you can save uploaded image's resized version in Images/Thumbnails. You can resize image to whatever size you want; there are number of articles in codeproject for that.

After that you can write html as

HTML
<a href='/Images/UserImages/MyImage.jpg">
 <img src='/Images/Thumbnail/MyImage.jpg" />
</a>

So clicking on thumbnail will redirect you to image path from where you can get original size image.
 
Share this answer
 
v2

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



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