protected void btnSave_Click(object sender, EventArgs e) { string ExpeDescription = this.txtExpeDescription.Text; string ExpeAddDate = this.txtExpeAddDate.Text; string ExpeName = this.txtExpeName.Text; string ExpePhone = this.txtExpePhone.Text; string ExpePicURL = this.txtExpePicURL.Text; int UID = int.Parse(Session["UID"].ToString()); CHSS.Model.CExpert model = new CHSS.Model.CExpert(); model.ExpeDescription = ExpeDescription; model.ExpeAddDate = ExpeAddDate; model.ExpeName = ExpeName; model.ExpePhone = ExpePhone; model.ExpePicURL = ExpePicURL; model.UID = UID; CHSS.BLL.CExpert bll = new CHSS.BLL.CExpert(); bll.Add(model); Response.Redirect("Show.aspx?id=" + (bll.GetMaxId() - 1)); }