62,133
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
public void dataToDataGrid()
{
SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["ConnectString"]);
conn.Open();
SqlCommand comm1=new SqlCommand("cb_Select",conn);
comm1.CommandType=CommandType.StoredProcedure ;
SqlDataAdapter da=new SqlDataAdapter();
da.SelectCommand=comm1;
DataSet ds=new DataSet();
da.Fill(ds);
int i=ds.Tables[0].Rows.Count ;
dgLastThreeInfo.DataSource=ds ;
dgLastThreeInfo.DataBind();
}
<INPUT id="btnSave" style="Z-INDEX: 114; LEFT: 752px; WIDTH: 104px; POSITION: absolute; TOP: 648px; HEIGHT: 32px" onclick="DataSave()" type="button" value="登録">