asp.net的gridview控件绑定数据
展开全部
SqlConnection con = new SqlConnection("server=.;uid=sa;database=TextProject");
SqlDataAdapter dr = new SqlDataAdapter("select id,name,某列=某列+1 from 表",con);
DataSet ds = new DataSet();
dr.Fill(ds,"aaa");
GridView1.DataSource = ds.Tables["aaa"];
GridView1.DataBind();
SqlDataAdapter dr = new SqlDataAdapter("select id,name,某列=某列+1 from 表",con);
DataSet ds = new DataSet();
dr.Fill(ds,"aaa");
GridView1.DataSource = ds.Tables["aaa"];
GridView1.DataBind();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询