You do not need to set value to location.href
using javascript in this case as this is an anchor tag and as long as you have a valid href
property value, it will be redirected to that on clicking on the link (unless you are overriding the click behavior and doing something (preventing the default behavior) using javascript.
You should be doing
<a class="btn btn-lg btn-primary btn-block" href="@Url.Action("Login","Home")">LOGIN</a>
Or using the Html.ActionLink
Html helper method to generate the anchor tag
@Html.ActionLink("Login", "Login", "Home", null ,
new {@class="btn btn-lg btn-primary btn-block"})
.onclick
- its already a link just set thehref
attribute, or better use@Html.ActionLink("LOGIN", "Login", "Home", null, new { @class = "btn btn-lg btn-primary btn-block" })
– user3559349 Dec 3 '15 at 1:34