In your controller:
public ActionResult Index() { DataTable dt = new DataTable(); return View(dt); }
In your view: Just create a model of type DataTable
Inherits="System.Web.Mvc.ViewPage<System.Data.DataTable>"
To iterate over it:
<% foreach (System.Data.DataRow row in Model.Rows) { %> <%= row["column"].ToString(); %> <%}%>
source share