I tried to Use the Telerik component Upload in asp mvc .
@(Html.Telerik().Upload()
.Name("attachement")
.Multiple(true)
.Async(async => async
.Save("Save", "Image")
.Remove("Remove", "Image")
.AutoUpload(true)
).ClientEvents(events => events.OnSuccess("onSuccess")))
In My Controller I have:
public ActionResult Save(HttpPostedFileBase attachement)
{
var fileName = attachement.FileName;
Guid id = SaveImage(attachement);
return Json(
new
{
Succces = true,
Content=id,
}
);
}
In my View I need to display the content of the Json Result , I have a event on the uploader called OnSucces
function onSuccess开发者_运维知识库(e) {
}
How Can I get the JsonContent in this method javascript and display the content . Or all this logic is wrong . Thanks in advance
Check the sending and receiving metadata help article.
精彩评论