0
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();
}
}
我想发送数据表以及组对象到视图。我将如何做到这一点asp.net mvc发送值查看
+1,你打我吧,只是暴露数据表作为属性MySpecificClass – 2010-05-10 08:39:42
不是真的,我不会这样做。而是将其复制到更通用的列表或IEnumerable。 DataTable感觉如此ADO.NET和WebForms,只是我的2美分.. – mare 2010-05-10 09:27:19
好的,谢谢我的点积分可能会好得多 – maztt 2010-05-10 10:50:15