We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

UploadBox - how to send a custom statut code to OnComplete callback function ?

Thread ID:





107769 Mar 15,2013 01:38 PM UTC Mar 19,2013 10:36 AM UTC ASP.NET MVC (Classic) 1
Tags: Tools
Jacques Duclos
Asked On March 15, 2013 01:38 PM UTC

How to send a custom statut code (action controller) to OnComplete callback function ?
Moreover, how can I check file size prior uploading it (by property max file size) ?
Jacques Duclos

Varalakshmi R.S [Syncfusion]
Replied On March 19, 2013 10:36 AM UTC

Hi Jacques Duclos,


Thanks for contacting Syncfusion forums.


Query 1:

You can send the custom status to controller by triggering ajax post on upload complete event. Please refer the below given code snippet,






        a =>

            a.SaveAction("Save", "Home")

            .RemoveAction("Remove", "Home")





function ClientSideOnComplete(sender, args) {

//Pass status as arguments in data


            type: "post",

            url: "Home/Index",

            data: { "args": "Custom Status" },

            dataType: 'html',

            success: function (data) {








        public ActionResult Index(string args)


//args hold the value sent from script

            return View();




Query 2:

The size of the file can be retrieved in the event “ClientSideOnSelect” from its argument “args[0].size”. please refer the below given code snippet,



function ClientSideOnSelect(sender, args) {




Note : To retrieve the file size in IE, you must enable the ActiveXcontrols using the below given option,

Tools->IE options-> Security->Trusted Sites->Custom level->Initialize and script ActiveX controls not marked as safefor scripting->Enable.


Kindly try the above solutions and let us know if this helps.





This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon