日期:2014-05-17 浏览次数:20579 次
protected void Button4_Click(object sender, EventArgs e)
{
string recuser = this.TextBox1.Text;
string[] str = recuser.Split(',');
string mcontent = TextBox2.Text;
string mtime = DateTime.Now.ToString();
string sender2 = Session["username"].ToString();
int mtype = 0;
string mzht = "new.png";
string sql = "insert into message (recuser,mcontent,mtime,sender,mtype,mzht)values('"+str+"','"+mcontent+"','"+mtime+"','"+sender2+"','"+mtype+"','"+mzht+"')";
try
{
int n;
n = db.Command(sql);
if (n > 0)
{
Response.Write(" <script language=javascript>alert('发送成功!');window.window.location.href='http://localhost:6984/TONGCHUANG/user/sendmessage.aspx';</script>");
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}