Demo:
<input type="button" value="Delete"
onclick="location.href='@Url.Action("UseDelete","User",new {id=5})'" />
使用页面跳转的方式实现动作方法的调用:
修改location对象的href属性值---->载入新的页面
Action()方法是MVC Web类UrlHelper,所提供的一些重载方法:
UrlHelper类
Demo:
<input type="button" value="Delete"
onclick="location.href='@Url.Action("UseDelete","User",new {id=5})'" />
使用页面跳转的方式实现动作方法的调用:
修改location对象的href属性值---->载入新的页面
Action()方法是MVC Web类UrlHelper,所提供的一些重载方法:
UrlHelper类