protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("trusted_connection=yes;database=northwind;server=localhost");
SqlDataAdapter da = new SqlDataAdapter("select * from customers", con);
DataSet ds = new DataSet();
da.Fill(ds, 4, 11, "cust");
GridView1.DataSource = ds.Tables["cust"];
GridView1.DataBind();
}
No comments:
Post a Comment