我想在 onComplete 函数中显示从控制器返回的数据:
function onComplete() {
alert(); //I want to show data that returned from controller in this.
}
这是ajax链接:
@Ajax.ActionLink("Upvote", "Upvote", "Author",
new AjaxOptions
{
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "vote_count",
OnComplete = "onComplete",
})
我的控制器:
public ActionResult Upvote(Guid QuestionID)
{
return Content("Message");
}
谢谢。