MVC Controller:
[HttpGet]
public ActionResult DetailList(ImportDetailSearchModel model)
{
Data.ImportDataAccess ida = new Data.ImportDataAccess();
List data = ida.GetImportDetails(model.FileId, model.FailuresOnly);
return PartialView("ImportSummaryDetailPartial", data);
}
MVC View:
Unique Id | Error Type | Field | Message | State |
@foreach (Data.ImportDetailData detail in Model)
{
@detail.UniqueID | @detail.ErrorType | @detail.FieldName | @detail.Message | @detail.ItemState |
}
How hard is that? No ViewState, No BS Page life-cycle...Just pure efficient code.