[RESOLVED]How get the radiobutton selected Value in Controller ?.

Hi Friends,

               How to get the value of radiobutton when we select the One Selection In the Controller . Give me suggestion with real Example 

 

Thanks In Advance ,

Karthik K 

Hi Karthik,

Use below code

<!-- Example of Radio Buttons (notice the name attribute) -->
<input type="radio" name="YourRadioButton" value="A">A<br />
<input type="radio" name="YourRadioButton" value="B">B<br />


[HttpPost]
public ActionResult YourAction()
{
      //Your Action Code Here
}

or

[HttpPost]
public ActionResult YourAction(string YourRadioButton)
{
      var YourRadioButton = Request.Form["YourRadioButton"];
}

Hi PawanPal,

                   Thank you so much .Its coming   

Karthik K

Leave a Reply