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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I let the UploadBox browse without the "Browse"-Button? (reusability)

Thread ID:

Created:

Updated:

Platform:

Replies:

129772 Apr 3,2017 04:35 AM Apr 6,2017 01:08 AM ASP.NET Web Forms 3
loading
Tags: Uploadbox
Carsten Wuttke
Asked On April 3, 2017 04:35 AM

Hi,
I wanna open the Browse-Dialog from the UploadBox from another button within my site so I can set multiple Buttons that open different uploads (partial different). How can I achieve that?

Mandatory ;-): Syncfusion 15.1.0.33, ASP.Net Webforms

Prince Oliver [Syncfusion]
Replied On April 4, 2017 04:53 AM

Hi Carsten, 

Thank you for contacting Syncfusion support. 

In order to open the Browse-Dialog from the UploadBox from another button, kindly refer to the following code snippet. 

 
<ej:UploadBox ID="Upload1" SaveUrl="saveFiles.ashx" RemoveUrl="removeFiles.ashx"  runat="server"></ej:UploadBox> 
 
<input type="button" id="sampleBtn" value="click to open upload dialog" /> 
 
<script> 
        $("#sampleBtn").on("click", function () { 
            $("input[type='file'][name='<%=Upload1.ClientID%>']").trigger("click"); 
        }); 
</script> 



Regards, 
Prince 


Carsten Wuttke
Replied On April 5, 2017 04:25 AM

Thanks prince. That worked.

Prince Oliver [Syncfusion]
Replied On April 6, 2017 01:08 AM

Hi Carsten, 
  
Most Welcome. 
  
Regards, 
Prince 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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

;