Search code examples
c#asp.nettelerikradupload

How to reset RadAsyncUpload after submission in the code behind?


I wonder how to reset (clear) RadAsyncUpload and leave the component as in the initial state

after the submission in the code behind?


my aspx ::

<telerik:RadAsyncUpload runat="server" ID="rada_attach" OnClientFileUploaded="onClientFileUploaded"
MultipleFileSelection="Disabled" InitialFileInputsCount="1" MaxFileInputsCount="1"
Width="100%" />

Solution

  • Try to add code below to Click event handler of submit button (not tested)

    ScriptManager.RegisterStartupScript(this, this.GetType(), "clearUpload", String.Format("$find('{0}').deleteAllFileInputs()", rada_attach.ClientID), true);