Friday, September 7, 2018

connect dynamic table on GRIDVIEW


DYNAMIC CONNECTIVITY


        string cs1 = ConfigurationManager.AppSettings["mydb"];
        cn7 = new SqlConnection(cs1);
        cn7.Open();

        string k = "select * from" + " " + ListBox1.Text;
        cm7 = new SqlCommand(k, cn7);
        dr7 = cm7.ExecuteReader();

        GridView1.DataSource = dr7;
        GridView1.DataBind();

No comments:

Post a Comment

GRIDVIEW ON ROW DATA BOUND EVENT

 Database Create  Student : roll , name , city , cost  Fix 6 Value  in Database Record  ====================================================...