Reputation: 4763
How can I add here a class name?
Html.ActionLink(
item.Name,
"GetProducts",
"Products",
new { CityName = item.CityName.UnderScore(), CategoryName = item.Name.UnderScore() },
null);
Thanks.
Upvotes: 0
Views: 97
Reputation: 15866
Use this Html.ActionLink overload method
public static MvcHtmlString ActionLink(
this HtmlHelper htmlHelper,
string linkText,
string actionName,
string controllerName,
RouteValueDictionary routeValues,
IDictionary<string, Object> htmlAttributes
)
your example
Html.ActionLink(
item.Name,
"GetProducts",
"Products",
new { CityName = item.CityName.UnderScore(), CategoryName = item.Name.UnderScore() },
new { @class="some_class" });
Upvotes: 2