} } public void bind() { string sqlstr = "select top 5 * from 飞狐工作室"; sqlcon = new SqlConnection(strCon); SqlDataAdapter myda = new SqlDataAdapter(sqlstr, sqlcon); DataSet myds = new DataSet(); sqlcon.Open(); myda.Fill(myds, "飞狐工作室"); GridView1.DataSource = myds; GridView1.DataKeyNames = new string[] { "身份证号码" }; GridView1.DataBind(); sqlcon.Close();
Gridview 的使用方法
最新推荐文章于 2022-04-13 14:17:45 发布