There isn't really much I can do in the way of explanation on this one.
Simply put, I'm trying to render this link:
<a class="button active-button" href="/Home/Register">Register</a>
My ActionLink looks like this:
@Html.ActionLink("Register", "Register", "Home", htmlAttributes: new { @class = "button active-button" })
Which renders this link:
<a class="button active-button" href="/Home/Register?Length=4">Register</a>
I don't understand where the QueryString value is coming from so where have I made my mistake?
This is happening because you are calling the wrong overload of ActionLink.
@Html.ActionLink("Register", "Register", "Home", null, new { @class = "button active-button" })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With