Im trying to retrieve data to a details view on a MVC project. thiw problem i've got Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource. Help ??
this is the code
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
DetailsView1.DataSource = ViewData["item"];
DetailsView1.DataBind();
}
</script>
and this is my function in the controller
public ActionResult Details(string ProdNo)
{
ProductionOrderItem item = ProductionOrderReg.GetProductionOrder(con, ProdNo);
ViewData["item"] = item;
return View();
}