我正在使用 Kendo UI 上传控件。我已经这样定义了 Kendo UI 上传:
<input type="file" name="resume" />
$("#file").kendoUpload({
async: {
saveUrl: "/Home/SaveResume",
autoUpload: true
},
complete: function (e)
{
// here i want to get the text that is returned from the controller
}
});
Controller 代码如下:
public ActionResult SaveResume(HttpPostedFileBase resume)
{
var text;
// code for the file to convert to text and assign it to text
return Json(text, JsonRequestBehavior.AllowGet);
}
返回代码后,我想以完整的功能检索代码。我该怎么做?
最佳答案
你可以像这样得到成功函数的响应
function onSuccess(e)
{
var response = e.response.data();
}
返回的 json 可能在哪里
return Json(new { data = text }, "text/plain");
关于c# - 如何获取kendoui上传成功或完成函数的返回值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15517048/