protected void cmdUpdate_Click(object sender, EventArgs e) { //create new data access layer object. clsDataLayer myDAL = new clsDataLayer(); //check the session state value for ValidRecord. If true call the UpdateAddress record which will update the record in the database. if (Convert.ToBoolean(Session["ValidRecord"])) { //call the Update Address method in myDAL clsDataLayer object. myDAL.UpdatAddress(Server.MapPath("~/App_Data/AddressBook.mdb"), Convert.ToInt32(txtAddressId.Text), txtFirstName.Text, txtLastName.Text, txtPhoneNumber.Text, txtEmail.Text); } BindGridView(); }