Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Client event on custom server error
posted

I want show a message in client when server is triggering an custom error upon uploading but i just cant get it to work. I can trigger other events and but i just cant get custom errors to work. Im using ASP.Net MVC and the ASP.NET MVC Helper. 

How do i trigger a custom error from my controller and show the error in the client?

Server controller:

       internal static void HandlerUploadFinising(object sender, UploadFinishingEventArgs args)

        {

            args.ServerMessage = "An error";

            args.Cancel = true;           

        }

Client: 

        $("#imageUpload").bind({

            iguploadfileuploaded: function (e, args) {

                console.log('iguploadfileuploaded ', args);

            }

        });

Parents Reply Children
No Data