public ActionResult Exit() { List <MastersModel> UserProfileList = new List <MastersModel>(); try { dt = mdb_layer.GetUserProfile(Convert.ToInt32(Session["Emp_id"])); foreach (DataRow dr in dt.Rows) { MastersModel mm = new MastersModel(); mm.Emp_Id = Convert.ToInt32(Session["Emp_id"]); mm.First_Name = dr["first_name"].ToString(); mm.JOB_NANE = dr["job_name"].ToString(); mm.Designation = dr["designation"].ToString(); mm.Department_Name = dr["department_name"].ToString(); mm.strDOJ = dr["date_of_joining"].ToString(); UserProfileList.Add(mm); } return(View(UserProfileList)); } catch (Exception ex) { return(View()); } }