I am creating a helper with ASP NET MVC 3 and Razor to display my grid
@helper ListaPessoa(IEnumerable<TesteHelpersMV3.Models.PessoaModel> listaPessoa)
{
<table>
<tr>
<th></th>
<th>Nome</th>
<th>Endereco</th>
<th>DataNascimento</th>
</tr>
@foreach (var item in listaPessoa)
{
<tr>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.Nome }) |
@Html.ActionLink("Details", "Details", new { id = item.Nome }) |
@Html.ActionLink("Delete", "Delete", new { id = item.Nome })
</td>
<td>@item.Nome</td>
<td>@item.Endereco</td>
<td>@item.Cidade</td>
</tr>
}
</table>
}
but the Razor can not find @Html.ActionLink and the following error occurs
Compiler Error Message: CS1061: 'System.Web.WebPages.Html.HtmlHelper' does not contain a definition for 'ActionLink' and no extension method 'ActionLink' accepting a first argument of type 'System.Web.WebPages.Html.HtmlHelper' could be found (are you missing a using directive or an assembly reference?)
what is wrong? ?? how to solve this problem??
Thank You
Leandro Prado