I am developing a project on ASP.net MVC.
I have a html form with some checkboxes say A,B,C,D & E and I am posting the form through ajax to one of the controllers.
I would like to distinctly identify if each check boxes are checked from the controller and perform some action based on the selected checkbox value.
I would like to know the best practise to acheive this.
Pravesh Singh
26-Mar-2014You can do it in many ways. Here i'm giving a example-
Using a model object
Lets assume, you have a model "CheckBoxValues" in server side with the fields
On your html page, use the code to get values from the checkboxes on a button click handler-
Now your actionmethod
Hope this will help you.