Disable postback trigger button on RadAsyncUpload

1 Answer 342 Views
AsyncUpload UI for ASP.NET AJAX in ASP.NET MVC
h
Top achievements
Rank 1
h asked on 01 May 2021, 08:03 PM

I am trying to disable the button that causes post back and starts the file upload. This is to avoid user hitting the button twice and causing the file to be uploaded again.


<telerik:RadAsyncUpload 
                        RenderMode="Lightweight" runat="server" 
                        ID="RadAsyncUpload1" 
                        OnFileUploaded="serversideFileUploadedEvent"
                        OnClientFileSelected="OnFileSelected" 
                        OnClientFileUploadRemoving="OnFileUploadRemoving"
                        PostbackTriggers="uploadbutton" 
                        DropZones=".DropZone1"  
                        HideFileInput="true" />

<asp:Button CssClass="btn btn-primary" runat="server" ID="uploadbutton" Text="Upload" />    

 

I tried binding click event to the button for disabling the button on the client side but then the server side method does not fire.

Is there a way to disable the button or fire both client side and server side events?

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 25 May 2021, 12:19 PM

Hello,

You can leverage the SingleClick functionality of the Telerik RadButton instead of using the simple asp:Button where this functionality needs to be coded manually. 

Regards,
Peter Milchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
AsyncUpload UI for ASP.NET AJAX in ASP.NET MVC
Asked by
h
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or