protected void Button1_Click(object sender, EventArgs e) { con.getConnection(); con.ExecuteQuery("insert into Message values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + DateTime.Now + "')"); Response.Write("<script>alert('Message sent')</script>"); tb.ClearTextbox(TextBox1, TextBox2, TextBox3, TextBox4); }
protected void Button1_Click(object sender, EventArgs e) { Models.ClearTextBox tx = new Models.ClearTextBox(); Models.Admin ad = new Models.Admin(); ad.name = TextBox1.Text; ad.email = TextBox2.Text; ad.password = TextBox3.Text; ad.Signup(ad); Response.Write("<script>alert('Successfully Signup')</script>"); tx.ClearTextbox(TextBox1, TextBox2, TextBox3); }
protected void Button2_Click(object sender, EventArgs e) { Models.Sell se = new Models.Sell(); se.Oname = TextBox1.Text; se.Oemail = TextBox2.Text; se.Ophone = TextBox3.Text; se.purpose = DropDownList1.Text; se.proptype = DropDownList2.Text; se.city = TextBox4.Text; se.address = TextBox5.Text; se.description = TextBox6.Text; se.price = TextBox7.Text; se.pic = Label1.Text; se.Add(se); Response.Write("<script>alert('Your Property Is Posted')</script>"); Models.ClearTextBox tx = new Models.ClearTextBox(); tx.ClearTextbox(TextBox1, TextBox2, TextBox3, TextBox4, TextBox5, TextBox6, TextBox7); Label1.Text = ""; Image1.ImageUrl = ""; }