We actually use Kendo for our UI at work. Ajax Upload buttons aren't too bad. Here's an example VB action and Razor (I picked VB because it's this app's language. If you need C# it's ez to translate)
Main things to note: The SaveField string in Razor HAS TO BE the name used for the IEnumerable HttpPostedFileBase arg in the controller method, otherwise the files won't be passed to the action. This is a kendo quirk.
VB Method Sig
Public Function UploadFile(files As IEnumerable(Of HttpPostedFileBase)) As ActionResult
//dostuff
Razor Block
@(Html.Kendo().Upload()
.Name("previewFile")
.Multiple(false)
.Async(a => a
.Save("UploadFile", "PosterSignup")
.Remove("RemoveFile", "PosterSignup")
.SaveField("files")
.AutoUpload(true)
)
.Events(e => e
.Select("onPreviewSelect"))
)
The Select event in the razor code can be a function used to perform checks or dialog prompts, and you can force it to cancel the auto upload by performing a preventDefault(). Aka
Subscribe to the Select event to control upload
function onPreviewSelect(e) {
if(//someCheck){
e.preventDefault();
}
}
If you don't want to autoUpload and preventDefault you can also remove autoUpload and use whatever Kendo action is exposed to begin file streaming to the server (I forget and their documentation is horrendous).