MVC中ActionName标记属性的用法
[ActionName("Aboutt")] public ActionResult No() { string name = Request["name"]; string id=Request["id"]; string i = name + id; ViewData["asd"] = i; return View("No"); }
$("#Button3").bind("click", function () {
$.ajax({
url: "/Home/Aboutt/",
type: "post",
data:{"name":"zhong","id":12},
error: function () {
alert("怎么会出现错误呢?不可思议啊!");
},
success: function () {
alert("已经成功啦!哈哈哈。。。");
window.location.href = "/Home/Aboutt/"
}
});
});
地址栏中的路由都是Controller名字/方法名字/
但是return view("No")返回到的是视图的名字。


浙公网安备 33010602011771号