I get an error Object reference not set to an instance of an object. when I am tryining
assign DataView to a datasource of a repeater control like so:
BioEducation Educ = new BioEducation();
DataView DV = Educ.EducationData().DefaultView;
dlEducation.DataSource = DV;
error is at this line: dlEducation.DataSource = DV;
//dlEducation is a repeater control
//EducationData is a function that returns DataTable
this line Educ.EducationData(); returns data ... I checked it by assigning it to DataTable like so:
//DataTable dt = new DataTable();
//dt = Educ.EducationData();
and looping through it ...
THIS CODE IS INSIDE private void Page_Load()
what could be the cause of that error?