protected void Save() { string str_sql = ""; string ls_gzjj = ftb_gzjj.Text.Replace("'", "’"); if (CommFun.StringCounter(ftb_gzjj.HtmlStrippedText) > 800) { Response.Write("<script>alert('业务工作简介限800字!');</script>"); return; } CommFun.ReplaceZiHao(ref ls_gzjj, "10.5"); //string str_pra = UploadFile(FileUpload_photo, "photo", Session["sfzh"].ToString()); //if (str_pra == "") return; //if (str_pra == ",") // str_pra = img_photo.ImageUrl.Substring(img_photo.ImageUrl.LastIndexOf("/") + 1); //else // str_pra = str_pra.Substring(str_pra.LastIndexOf(",") + 1); str_sql = string.Format("update cpry set yourname = '{0}',birth = '{1}',xingbie = '{2}',zgxl_mc = '{3}',zgxl_bysj = '{4}'," + "zgxl_zy = '{5}',zgxl_sydw = '{6}',fhxl_mc = '{7}',fhxl_bysj = '{8}',fhxl_zy = '{9}',fhxl_sydw = '{10}'," + "fhxw_mc = '{11}',fhxw_qdsj = '{12}',fhxw_zy = '{13}',fhxw_sydw = '{14}',xrzw = '{15}',pdsj = '{16}',prsj = '{17}',gzjj='{18}' where sfzh = '{19}'", tbx2_xm.Text, tbx2_csny.Value, ddlist2_xb.SelectedValue, ddlist2_xl1.SelectedValue, tbx2_bysj1.Value, tbx2_zy1.Text, tbx2_sydw1.Text, ddlist2_xl2.SelectedValue, tbx2_bysj2.Value, tbx2_zy2.Text, tbx2_sydw2.Text, ddlist2_xw.SelectedValue, tbx2_qdsj.Value, tbx2_zy3.Text, tbx2_sydw3.Text, tbx2_xrzw.Text, tbx2_pdsj.Value, tbx2_prsj.Value, ftb_gzjj.HtmlStrippedText, Session["sfzh"].ToString()); if (DBFun.ExecuteUpdate(str_sql)) { Response.Write("<script>alert('保存成功!');</script>"); } else { Response.Write("<script>alert('保存失败!');</script>"); return; } bindData(); }