public ActionResult Create()
{
try
{
var Group = GroupRepository.FindAllGroups();
ViewData["Group"] = GroupRepository.FindAllGroups();
ViewData["Feature"] = FeatureRepository.FindAllFeatures();
DataTable dt = FeatureRepository.GetAllFeatures();
// TODO: Add insert logic here
Group group = new Group()
{
dtm_CreatedDate = DateTime.Now,
int_CreatedBy = 1
};
return View(group);
}
catch
{
return View();
}
}
I want to send the datatable as well as the group object to the view. how will i do that
Create new specific class, that will keep the Group object as member and any objects you need to use in View
and after this specify this class instance as View argument