lundi 24 juillet 2017

how can I get the selected value of checkboxlist and passed that value from view to controller using jquery

view:

 @using (Ajax.BeginForm("Searchbyquality", "Health", new AjaxOptions { HttpMethod = "POST" }))
     {
        foreach (var item in Model.QualityModel)
        {
       <li><input type="checkbox" name="qualitycheck"/><span>item.qualityName</span></li>
        }
   }

Controller:

public ActionResult Searchbyquality(string[] qualitycheck )
{
           //code of searching

}

I want to pass multiple selected value to the controller




Aucun commentaire:

Enregistrer un commentaire