protected void btnAgreeRules_Click(object sender, EventArgs e) { int user_id = Convert.ToInt32(Context.Items["UserID"]); qPtl_UserProfile profile = new qPtl_UserProfile(user_id); profile.AgreeRules = DateTime.Now; profile.Update(); // see if this is the action page -- if so, update actionID int action_id = 0; if (!String.IsNullOrEmpty(Convert.ToString(Request.QueryString["actionID"]))) { action_id = Convert.ToInt32(Request.QueryString["actionID"]); qPtl_UserAction action = new qPtl_UserAction(user_id, action_id); action.LastModified = DateTime.Now; action.LastModifiedBy = user_id; action.UserCompleted = DateTime.Now; action.Update(); Response.Redirect(action.RedirectURL); } }