Action link @class="info" not working for css
@Html.ActionLink("Click Here", "Details", "Product", new { id = item.ProductId, @class="info" },null)
Html page source
<a href="/Product/Details/14?class=info">Click Here</a>
Update:
on the other hand
if i set @Html.ActionLink("link here", "Details", "Product", new { id = item.ProductId}) then generate this link localhost:18715/Home/Details?Length=7 why? and it is not working
if i set @Html.ActionLink("link here", "Details", "Product", new { id = item.ProductId},null)
it is working perfectly generate this link http://localhost:18715/Product/Details/17
what i am missing for each link
@class="info"from the 4th parameter and addnew { @class="info" }in lieu of the 5th parameternew { @class="info" }in lieu ofnullfor the last parameter :)nullparameter, other wise"Product"is added as a route parameter and astringhas only one property so it generateslength=7because "Product" last a length of 7 (characters)