I have trouble trying to send an id by url, the thing is that this id is being called from a partialview () and I would have to redirect it to another view, but it generates the following exception AmbiguousMatchException.
Here's how I send the id:
http://localhost:52509/TiposAsesores/delete_usuario_grup/18
In the partialview () view, the button where the id is sent is:
<a href="@Url.Action("delete_usuario_grup","TiposAsesores", new { id = item.GrupAsesor})" class="btn btn-danger" title="Eliminar del grupo"><i class="fa fa-trash-o"></i></a>
And so it looks from the browser:
<a href="/TiposAsesores/delete_usuario_grup/18" class="btn btn-danger" title="Eliminar del grupo"><i class="fa fa-trash-o"></i></a>
And this is the action of the controller that receives the id:
public ActionResult delete_usuario_grup(int id)
{
Sto_TipoAsesor_Usuario_NE STAUNE = new Sto_TipoAsesor_Usuario_NE();
Sto_TipoAsesor_Usuario STAU = new Sto_TipoAsesor_Usuario();
STAU.Id_TipoAsesor_Usuario = id;
STAU = STAUNE.ListarByID(STAU);
return View(STAU);
}
And this is the complete error that I generated when loading the view:
La solicitud actual para la acción 'delete_usuario_grup' en el tipo de controlador 'TiposAsesoresController' es ambigua entre los métodos de acción siguientes:
System.Web.Mvc.ActionResult delete_usuario_grup(Int32) en el tipo SistemaDeSeguimientoEstudiantil.Controllers.TiposAsesoresController
System.Web.Mvc.ActionResult delete_usuario_grup(CapaEntidad.Sto_TipoAsesor_Usuario) en el tipo SistemaDeSeguimientoEstudiantil.Controllers.TiposAsesoresController
Someone could advise me on how to solve this error