In my Controller I have been setting
ViewData.Model = DBModel.Table.Take(1).Single();
Where DBModel is create by DBML file of Linq-to-SQL
And I can access the Value thro' ViewData.Eval("ColumnName")
,
But If I create my own class
Class Test{
public string Col = "Testing ViewData";
}
Test objTest = new Test();
ViewData.Model = objTest;
Now If I try to get ViewData.Eval("Col")
returns null.
Both I tried to store in ViewData.Model.
Whats the problem on this.