I have 2 radio buttons with mvc view.When i do form submit that Checkboxes values not pass to the controller.
I have a form submit like this,
@using(Html.BeginForm("Index","Employee",FormMethod.Get))
{
<b>Search by :</b>@Html.RadioButton("Searchby", "EmpName",true)<text>Name</text>
@Html.RadioButton("Searchby", "IsPermanant")<text>Id</text><br />
@Html.TextBox("Search");
<input type="submit" value="Search" />
}
I have a controller
public ActionResult Index(string Search, bool Searchby)//In here searchby is null
{
}
Aucun commentaire:
Enregistrer un commentaire