I want to test if the checkbox is checked or not from my action method, what i need is to pass checkbox value from view to controller.
This is my view:
None of the previous solutions worked for me. Finally I found that the action should be coded as:
public ActionResult Index(string MyCheck = null)
and then, when checked the passed value was "on", not "true". Else, it is always null.
Hope it helps somebody!