protected void Button1_Click(object sender, EventArgs e)
{
string s;
s = (String)Session["Pass"];
string time;
time = System.DateTime.Now.ToString();
string strconn = "Server=PC-201106261541;DataBase=binghe
;Integrated Security=true";
SqlConnection conn = new SqlConnection(strconn);
conn.Open();
string inStr = "insert into liuyanban
(liuyan_name, liuyan_qq , liuyan_note) values('" + s + "','" + TextBox1.Text + "','" + System.DateTime.Now.ToString() + "')";
SqlCommand cmd = new SqlCommand(inStr, conn);
cmd.ExecuteNonQuery();
Response.Write("<script language=javascript>alert(提交成功!!')</script>");
}
追问是asp的吗?
这个不用接受页面吗?
这段代码加到哪里?谢谢了