Call Controller with parameters from radio button click event

1

Controller

public ActionResult Index(string Color, string Numero)
{
    return View();
}

In the (simplified) view ...

<div id=”radioColor”>
   <input type=”radio” id=”Color” name=”Color” value=”rojo″ >Rojo</input >
   <input type=”radio” id=”Color” name=”Color” value=”azul″ >Azul</input >
</div>

<div id=”radioNumero”>
   <input type=”radio” id=”Numero” name=”Numero” value=”uno″ >Uno</input >
   <input type=”radio” id=”Numero” name=”Numero” value=”dos″ >Dos</input >
</div>

When you click on any radio, you should call the Index controller with the RadioColor and RadioNumber currently selected values

    
asked by Dmz 11.09.2018 в 03:17
source

0 answers