I have been working on a MVC4 C# project and in my Razor view need to send two parameters to a specific MVC Action when the due button is clicked, I decided to use jQuery in order to send the two parameters.
This is the code in the click event:
$('#salir').click(function () {
window.location.href = '@Url.Action(actionName: "MostarOrdenInicioEmpleados", controllerName: "Home", new { id = Convert.ToString(Model.num_doc), grupo= Convert.ToInt32(Model.grupo)})';
});
and this is the controller where I need to send the two parameters:
[HttpGet]
[Authorize]
public ActionResult MostarOrdenInicioEmpleados(string id, Int32 grupo)
But this is the error in the Razor view:
Error text:
Named argument specifications must appear after all fixed arguments have been specified
Could you please tell me what the problem is?
