日期:2014-05-18 浏览次数:20465 次
protected void Button1_Click(object sender, EventArgs e) { string name = job_name.Text; string address = job_address.Text; string telephone = job_telephone.Text; SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["连接字符串"]); conn.Open(); SqlCommand cmd = new SqlCommand("", conn); cmd.CommandText = "insert into HY_GRXX (job_name,job_address,job_telephone) value ('" + name + "','" + address + "','" + telephone + "')"; int i = cmd.ExecuteNonQuery(); if (i > 0) { Response.Write("<script>alert('提示信息:操作成功!');</script>"); } conn.Close(); }