hi can anybudy temme the reason of this error
my code is
DataClassesDataContext dc = new DataClassesDataContext();
tblUser tu = new tblUser();
var res = (from p in dc.tblUsers where p.nUserID == _index select p).FirstOrDefault();
res.strUserName = txtUserName.Text;
res.strPassword = txtPassword.Text;
res.dAddDate = Convert.ToDateTime(DateTime.Now.ToShortDateString());
res.bIsDeleted = false;
it is giving me dis exception on
res.strUserName = txtUserName.Text;
why its so:((