protected void Button1_Click(object sender, EventArgs e) { var Tell = new Web1.tell { tell1 = TextBox1.Text, name = Convert.ToString(Session["name"]), time = DateTime.Now.ToString() }; db.tell.InsertOnSubmit(Tell); db.SubmitChanges(); var q = (from tell in db.tell where (tell.tid > u) select tell); foreach (Web1.tell C in q) { u = C.tid; x = C.name + "说:" + C.tell1 + "(" + C.time + ")<br/>" + x; Label2.Text = x; i++; } TextBox1.Text = ""; }
partial void Updatetell(tell instance);
partial void Deletetell(tell instance);
partial void Inserttell(tell instance);