日期:2014-05-18 浏览次数:20655 次
<asp:TextBox ID="TextBox1" runat="server" Width="450px" Text="个性签名档" TextMode="MultiLine" style="font-weight: 700; border-style: ridge; border-width: 2px; background-color: #CBCD82; background-image: url('pictures/background.jpg')" > </asp:TextBox>
protected void Button1_Click(object sender, EventArgs e) { string words = TextBox2.Text.ToString(); string date = DateTime.Now.ToLocalTime().ToString(); string username = ""; if (Session["username"].ToString() == "") { username = "路人甲"; } else { username = Session["username"].ToString(); } string userimg = Session["userimg"].ToString(); DB.ExSql("insert into leaving_message (words,date,username,userimg) values ('" + words + "','" + date + "','" + username + "','" + userimg + "')"); Response.Redirect("homepage.aspx"); }