Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Image Resize Control for Sharepoint
WhatsApp
Destin Joy
13y
26.5k
0
0
100
Article
code.zip
In this article I am showing an Image resize control that can be used in share point. This will be use full if you are loading an image from share point picture library and showing in a web part. This will help you to automatically resize the image with proportional height and width.
First step is to place the ThumbImage.aspx and ThumbImage.aspx.cs file in _layout folder of share point. I have attached the code file for both please have a look at the code.
As the web part accessing the images from picture library you have to give the network credentials to view the images for normal users (I am using anonymous access in the web application, if you are not using you can avoid passing network credentials).
Where you want to resize the image call the below
imgLogo.Src =
@"/_layouts//ThumbImage.aspx?img="
+ item[
"Image _Logo"
].ToString().Substring(0, item[
"Image _Logo "
].ToString().IndexOf(
","
));
Where Image _Logo contains the URL of the image.
Image Resize Control
Image Resize Control for Sharepoint
Sharepoint
Up Next
Ebook Download
View all
SharePoint Online And Office 365 Administration
Read by 3.6k people
Download Now!
Learn
View all
Membership not found