My query is that i have data from database in datatable .
DataTable dt = OBJ.Fetch_PartDetails();
in dt i have all the records .Now i add all the records in list as
List list = new List();
for(int i=0;i
//foreach(var item in dt.Rows)
{
SecretaryUserModel GetAll = new SecretaryUserModel();
GetAll.TransactionDate = dt.Rows[i]["TransactionDate"].ToString();
GetAll.SLNo = Convert.ToInt32(dt.Rows[i]["SLNO"]);
GetAll.Particular = Convert.ToString(dt.Rows[i]["Particular"]);
GetAll.Balance = Convert.ToDecimal(dt.Rows[i]["Balance"]);
GetAll.Credit_Expenses = Convert.ToDecimal(dt.Rows[i]["Credit_Expenses"]);
GetAll.Debit_Expenses = Convert.ToDecimal(dt.Rows[i]["Debit_Expenses"]);
list.Add(GetAll);
}
and finally i send list to the view.
In top of the view page i declared it as
@model IEnumerable
but when i call the object of SecretaryUserModel the error come to me as
ienumerabledoes not contain a definition for fromdate and no extension........

Nitin SontakkeRank #264 · 9.6K reputationPosted Jul 13, 2016, 8:49 PM EDT
sourabh choubey173 reputationPosted Jul 13, 2016, 9:06 PM EDT
sourabh choubey173 reputationPosted Jul 13, 2016, 9:08 PM EDT
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[ServiceCatalogue.UI.Areas.BMS.Models.SecretaryUserModel]', but this dictionary requires a model item of type 'ServiceCatalogue.UI.Areas.BMS.Models.SecretaryUserModel'.
this eroor i am getting..Nitin SontakkeRank #264 · 9.6K reputationPosted Jul 13, 2016, 9:12 PM EDT
sourabh choubey173 reputationPosted Jul 13, 2016, 9:16 PM EDT
Modal title
Details
Nitin SontakkeRank #264 · 9.6K reputationPosted Jul 13, 2016, 9:39 PM EDT
Vinay SinghRank #604 · 4K reputationPosted Jul 13, 2016, 10:36 PM EDT