views:

429

answers:

1

I want to generate a couple of checkboxes on an ASP .NET MVC page. How can I retrieve their data in a controller after posting the page?

+1  A: 

Use the Request.Form collection:

Request.Form["control-id"]

or declare a FormsCollection parameter in your action method and use it to retrieve the value.

Mehrdad Afshari
care to explain the reason for downvote?
Mehrdad Afshari
+1: So far with the sketchiest of info in the question this is a reasonable answer.
AnthonyWJones