i want Get values or data from database and pass every columns from database with columns that i add it in gridview.
con.Open(); SqlCommand cmd = new SqlCommand("Select code,Name,Salary,desc FROM tableName", con); SqlDataReader dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); con.Close();
How i cgange this code and pass this columns(code ,Name ,salary ,Desc) to the columns that i add it in gridview