protected void Page_Load(object sender, EventArgs e) { travel p = new travel(); p.Adapter("select *, '~/user/image/'+pro.img as im from pro"); if (p.dt.Rows.Count != null) { DataList1.DataSource = p.dt; DataList1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { obj.Adapter("select * from notification where place='" + TextBox1.Text + "' AND NOT phone='" + Session["phone"] + "'"); if (obj.dt.Rows.Count != 0) { DataList1.DataSource = obj.dt; DataList1.DataBind(); } else { Response.Write("<script> message('no message')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { p.Adapter("select *,'~/user/image/'+pro.img as im from pro where phone='" + Session["phone"] + "'"); if (p.dt.Rows.Count != null) { DataList1.DataSource = p.dt; DataList1.DataBind(); } else { Response.Redirect("addp.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { string phone = Request.QueryString["phone"]; p.Adapter("select *, '~/user/image/'+pro.img as im from pro where phone='" + phone + "'"); if (p.dt.Rows.Count != null) { DataList1.DataSource = p.dt; DataList1.DataBind(); } p.Adapter("select * from chat where phone='" + phone + "'"); if (p.dt.Rows.Count == null) { Response.Redirect("chat.aspx"); } else { DataList1.DataSource = p.dt; DataList1.DataBind(); } p.Adapter("select * from chat where phone='" + TextBox2.Text + "'"); if (p.dt.Rows.Count == null) { Response.Redirect("chat.aspx"); } else { DataList1.DataSource = p.dt; DataList1.DataBind(); } }