We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the src of an existing image by using UploadBox?

Platform: ASP.NET MVC |
Control: Uploadbox |
Published Date: July 6, 2015 |
Last Revised Date: August 19, 2015

Description

You can change the source of image by using the complete event of UploadBox control.

Solution

Initially, you can render the image tag with the source of image as illustrated in the following code example.

CSHTML

Declare the complete event in UploadBox control as illustrated in the following code example.

CSHTML

The complete event triggers when the file upload progress is completed. To change the img tag src by a selected image from the UploadBox, use the complete event in the script section as illustrated in the following code example.

JS

The parameters passed in the argument of complete event is illustrated in the following API reference UG link.

http://help.syncfusion.com/UG/JS_CR/ejUploadbox.html

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon