从按钮调用Html.ActionLink?

如何调用注册”ActionLink(在标准MVC5上生成的那个)
从引导按钮使用VS2013的项目?

这是原始代码

@Html.ActionLink("Register","Register","Account",routeValues: null,htmlAttributes: new { id = "registerLink" })

我试过这个,但显然它不起作用:

<button type="button" class="btn btn-info" onclick="window.location.href('@Url.Action("Register","Account")')">Add New User</button>

解决方法

<input type="button" class="btn btn-info" value="Let's Go!" onclick="location.href='@Url.Action("Action","Controller")'" />

这应该工作正常……

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些