2
Calling the controller is no longer calling the Actionresult (Solved) I have my view:
@model IEnumerable<Generico.Dominio.TB_MENU>
@{
ViewBag.Title = "Index";
}
@Html.Partial("_navbarInterno")
@Html.Partial("_PartialLogin")
<div class="list-group">
<a href="#" class="list-group-item active">
Seleccione una opción
</a>
@if (Model.Count() > 0)
{
foreach (var item in Model)
{
<a href="/Operacao/Index/@item.idmenu" class="list-group-item">@Html.DisplayFor(c => item.descricaomenu)</a>
}
}
</div>
in the controller:
// GET: Operacao
public ActionResult Index(int id)
{
//pega a opção selecionada para trazer as opções
int opcao = id;
return View();
}
Put the view name and folder where it is, please?
– Ricardo
<a href="@Url.Action("Index", "Operation", @Html.Displayfor(c => item.idmenu)"class="list-group-item">@Html.Displayfor(c => item.descricaomenu)</a>
– Harry
@Ricardo this in the question,
– Harry