Вот пример, демонстрирующий, как передать значение флажка в контроллер.
Вид:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
Home Page
</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<h2><%= Html.Encode(ViewData["Message"]) %></h2>
<p>
To learn more about ASP.NET MVC visit <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.
<form action="/home/index" method="post">
<input type="checkbox" name="cb" value="value1" />
<input type="checkbox" name="cb" value="value2" />
<input type="submit" />
</form>
</p>
</asp:Content>
Контроллер:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string cb)
{
ViewData["Message"] = cb;
return View();
}
Этот пример демонстрирует, как получить через массив.
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string[] cb)
{
string result = "";
foreach (string value in cb)
result += value.ToString() + " ";
ViewData["Message"] = result;
return View();
}
<form action="/home/index" method="post">
<input type="checkbox" name="cb" value="v1" />
<input type="checkbox" name="cb" value="v2" />
<input type="checkbox" name="cb" value="v3" />
<input type="checkbox" name="cb" value="v4" />
<input type="submit" />
</form>