使用Action()和ActionLink()生成链接
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> </head> <body> <div> <a href="@Url.Action("GetStuList", "Student", new {id=1001,age=20,gender=0 })">学生管理</a> <br /><br /> @Html.ActionLink("详细信息", "GetStuList", "Student", new { id = 1001, age = 20, gender = 0 }, new { @class="stulink",title="学生姓名"}) </div> </body> </html>
提示:使用Html.RouteLink()代替Html.ActionLink()
提示:可以使用Html.Action()代替Url.Action