Following is the code to modify data using entity framework
int idtoupdate = Convert.ToInt32(Request.QueryString["EmpId"]);
EmployeeEntities db = new EmployeeEntities();
Employee emp = db.Employees.SingleOrDefault(p => p.EmpId == idtoupdate);
I am getting error for below line.......
emp.EmpLoc = TextBox1.Text;
Label2.Text = Convert.ToString(emp.EmpId);
Label4.Text = emp.EmpName;
db.SaveChanges();