You must Sign In to post a response.
  • Category: ASP.NET

    File upload control - Telerik


    I have one web page with telerik "radasyncupload" control.
    In that, I have functionality of selection of image - Display to user - Save into database.

    Here while browse - File select, I need to display image to user without saving it into server.
    Because, if user doesn't want to save the file, the file keep as it is on server which creates junk files.

    Currently flow is working like, once user selects an image, it automatically save into server and then display to front end user, then user can decide he want to save it or not into database.

    So i want functionality like, when user selects an image, display it to user without saving. And when user click on save , then only save the file to actual server location.
    Anyone help me on this ???
  • #766945

    try this code

    <telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" CssClass="async-attachment" ID="AsyncUpload1"
    AllowedFileExtensions=".jpeg,.jpg,.png,.doc,.docx,.xls,.xlsx" />
    <span class="allowed-attachments">Select files to upload <span class="allowed-attachments-list">(<%= String.Join( ",", AsyncUpload1.AllowedFileExtensions ) %>)</span>

    you can refer this url


    Name : Dotnet Developer-2015
    Email Id :

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766960

    I'm not sure about telerik but as per my knowledge in and your tag also set to, I assume you are working in web application project, so I given suggestion for the same,

    As you said when you browse the file itself you are saving the file in server and shows that to end user, now you want to change the logic, once click on save button you want to save into database/ server, in that case whatever the code part you wrote for saving the file into server cut the piece of code and create on more button name it as save and onclick of that button paste the copied content over there, if you still have a problem then place your piece of code for browse the file. So, that we can help you....

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #766967
    At Page_Load() event set RadAsyncUploadControl.TargetFolder = "desired folder";.
    Then call RadAsyncUpload_FileUploaded() event as OnFileUploaded="RadAsyncUploadControl_FileUploaded".
    Inside that event just write code to save file to specific folder as

    protected void RadAsyncUploadControl_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
    e.File.SaveAs(RadAsyncUploadControl.TargetFolder + "\\"+ e.File.GetName());

    After that inside btnSave_Click() event, write code to save file to DB.

  • Sign In to post your comments