Returning Messages from Server

4 posts, 0 answers
  1. Josh
    Josh avatar
    6 posts
    Member since:
    Nov 2015

    Posted 31 May 2017 Link to this post

    I would like to return an error or status message from the server after a file is uploaded and processed based on the contents of the file.  Is there a way to send a message back to the onClientFileUploaded event handler without extending a custom handler for each upload control I want on my website?
  2. Peter Milchev
    Admin
    Peter Milchev avatar
    615 posts

    Posted 05 Jun 2017 Link to this post

    Hello Josh,

    Sending custom messages from the server requires a Custom Handler for the AsyncUpload - AsyncUpload - Custom Http Handler online demo.

    If you want to set the handler for all AsyncUpload controls, there are some approaches for achieving it: 
    • Wrapping the AsyncUpload in a UserControl.
    • Using ASP.NET Themes (similar implementation is used for the RadEditor demos, the Skin implementation can be found in the /App_Themes/Default folder of the Local demos);
    • Inheriting the AsyncUpload control;
    • Using a ControlAdapter;  

    Regards, Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Josh
    Josh avatar
    6 posts
    Member since:
    Nov 2015

    Posted 06 Jun 2017 in reply to Peter Milchev Link to this post

    That's not quite what I was going for.  My scenario is that I have several pages that each have an upload control that all process different files in different ways.  Some of them return messages, some don't.  Is there a way to return messages without having to write a separate upload module for each process?
  4. Peter Milchev
    Admin
    Peter Milchev avatar
    615 posts

    Posted 09 Jun 2017 Link to this post

    Hello Josh,

    I am afraid that returning messages from the server requires Custom Handler and you should implement it to achieve the desired functionality. 

    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top