1
I have an application in ASP.NET CORE 2.0 where I did the following method in the controller [HttpGet]
public IActionResult Index(int idLeilao)
{
ConsultaCarrosModel obj = new ConsultaCarrosModel();
ViewBag.ListaMarcas = obj.ListaMarcas("marcas.json");
return View();
}
When you click on a button passing this 'ID' in the url it is loaded with the ID I want but the value that arrives in the controller is always 0
As you can see the ID I passed in the URL is 4 but the one that arrived in the controller was 0(default), as if it did not arrive in the controller before loading the page