I am creating an MVC4 application. I have a small issue. My code is
@Html.ActionLink(\"Contract\", \"Contract\", \"Home\", new {
You mixed up the parameters. You have to send anonymous object as htmlAttributes parameter.
@Html.ActionLink("Contract", "Contract", "Home", null ,new { id = "lnk_contract" })
Here's the MSDN page for this overload:
http://msdn.microsoft.com/en-us/library/dd504972(v=vs.108).aspx
You need to add the parameter
, new {}
to Html.ActionLink
.
The first object is for the query string, the second is for the HTML parameters.