ASP.NET MVC CHECKBOXES PROBLEM
- by mazhar
CONTROLLER
public ActionResult Index()
{
GroupRepository grouprepository = new GroupRepository();
ViewData["Group"] = grouprepository.FindGroups();
return View();
}
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %
<% foreach (Group i in ViewData["Group"] as List)
{ %
" checked="checked" /
<% } %
The thing is that it is not able to find group id and displaying the following error. What is the solution?
CS1061: 'System.Text.RegularExpressions.Group' does not contain a definition
for 'int_GroupId' and no extension method 'int_GroupId' accepting a first
argument of type 'System.Text.RegularExpressions.Group' could be found
(are you missing a using directive or an assembly reference?)