public partial class Default2 : System.Web.UI.Page { SqlConnection con = new SqlConnection("Data Source=xxx.xx.xxx.xxx;Initial Catalog=x;Uid=t;Password=xxx;"); SqlCommand cmd; SqlDataReader dr; TextBox email = new TextBox(); protected void Page_Load(object sender, EventArgs e) { email.Text = "" + Session["email"]; } protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e) { con.Open(); cmd = new SqlCommand("SELECT C, P, t, FROM w1 WHERE email='" + email.Text + "'", con); dr = cmd.ExecuteReader(); con.Close(); } }
SqlDataSource1_Selecting
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)