I have this simple snippet with an ActionLink that is supposed to display some text as a link, but it's not working.
Here's the code snippet.
<div id = "Div1">
<table id = "Table1">
<% while ((category = SomeNamespace.Helper.GetNextCategory(categoryIndex++)) != null)
{ %>
<tr>
<td class = "catalogCell">
<% Html.ActionLink(category.Name,
"DisplayCategory",
"Catalog"); %>
</td>
</tr>
<% } %>
</table>
</div>
You need an = sign:
<%= Html.ActionLink(category.Name,
"DisplayCategory",
"Catalog") %>
Use the <%: ... %> style and be sure to remove the semi-colon (;) at the end of the statement.
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