Plugin - Kendo UI - Upload

 

前端 cshtml

// 异步提交的方式
@using(Html.BeginForm()) { @(Html.Kendo().Upload() .Name("Files") .Async(a => a .Save("Save", "Home") .AutoUpload(false) ) ) }

 

// 表单提交的方式
// 如果存在异步提交的方式, 这种方式则无法传参数
@using(Html.BeginForm("Save","Home",FormMethod.Post)) { @(Html.Kendo().Upload() .Name("Files") ) <input type="submit" value="保存" /> }

 

后台

[HttpPost]
public ActionResult Save(IEnumerable<HttpPostedFileBase> Files)
{
    int i = 1;
    return null;
}

 

posted @ 2015-04-22 13:09  `Laimic  阅读(466)  评论(0)    收藏  举报