前台:
$.ajax({
async: true,
type: "post",
url: "AutoDataNo",
data: { "type": "Hi" },
dataType: "json",
success: function (data) {
$("#DataNo").val(data);
}
})
后台:
[HttpPost]
public JsonResult AutoDataNo(string type)
{
return Json(type);
}
最后
以上就是安静鞋垫最近收集整理的关于ASP.NET MVC5与ajax前后台交互的全部内容,更多相关ASP.NET内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复