I want to show data that returned from controller, in onComplete function:
function onComplete() {
alert(); //I want to show data that returned from controller in this.
}
here is ajax link:
@Ajax.ActionLink("Upvote", "Upvote", "Author",
new AjaxOptions
{
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "vote_count",
OnComplete = "onComplete",
})
And my controller:
public ActionResult Upvote(Guid QuestionID)
{
return Content("Message");
}
Thanks.