当我使用以下操作链接时:
<%: Html.ActionLink("Study Cases", "Index", "CourseCases", new { id = Model.ID }, new { @class = "t-button", @style = "width:240px; color:white; text-align:center" })%>
浏览器中的url地址为:
http://localhost:11111/CourseCases/Index/9
我怎样才能改变它,所以 url 将是
http://localhost:11111/CourseCases?courseId=9
它在我使用时有效:
return RedirectToAction("Index", "CourseCases", new { courseId = id });
在控制器中。非常感谢。