Hi
I have below code & i want when user upload image it should be displayed below in a image.
Code
Files to AttachThanks
Hi
I have below code & i want when user upload image it should be displayed below in a image.
Files to AttachThanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankajkumar PatelRank #181 · 13.4K reputationPosted Dec 9, 2022, 9:17 AM EST
Hi Ramco Ramco,
Practical example:
Demo link:
Hope this will help you!
Sachin SinghRank #66 · 26.2K reputationPosted Dec 10, 2022, 3:59 AM EST
Please follow this article
https://www.aspsnippets.com/Articles/Preview-image-before-upload-using-FileUpload-control-and-jQuery-in-ASPNet.aspx
Jignesh KumarRank #91 · 22.9K reputationPosted Dec 11, 2022, 12:24 AM EST
Hello Ramco,
Please refer below links,
https://www.c-sharpcorner.com/blogs/asp-net-webforms-uploading-and-validating-and-displaying-images
https://stackoverflow.com/questions/21808415/how-to-show-the-image-after-upload-in-asp-net-fileupload
Marvin ReidRank #1,963 · 746 reputationPosted Dec 29, 2022, 5:36 PM EST
You can display an uploaded image using the ImageViewer which you can add inside a div. Here is an example and documentation which you can build on.
const imageViewerDiv = document.getElementById("imageViewerDiv"); const createOptions = new lt.Controls.ImageViewerCreateOptions( imageViewerDiv ); this.imageViewer = new lt.Controls.ImageViewer(createOptions); this.imageViewer.viewVerticalAlignment = lt.Controls.ControlAlignment.center; this.imageViewer.viewHorizontalAlignment = lt.Controls.ControlAlignment.center; this.imageViewer.autoCreateCanvas = true; this.imageViewer.imageUrl = https://demo.leadtools.com/images/jpeg/cannon.jpg;https://www.leadtools.com/help/sdk/tutorials/html5-js-display-images-in-an-image-viewer.html
https://www.leadtools.com/help/sdk/v22/dh/javascript/c/imageviewer.html