怎么将label控件和数据库绑定啊? Label1.Text = ds.Tables["system"].Rows[0]["YourColumn"].ToString(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 或者Label1.Text = ds.Tables["system"].Rows[0].ItemArray[columnIndex].ToString(); 同意楼上,Label1最好不要用绑定数据集。还是把数据表里的一个字段值给Label1.Text string SQL="Select * from soccer_system"; DataSet ds=new DataSet(); SqlDataAdapter Adapter=new SqlDataAdapter(SQL,Conn); Adapter.Fill(ds,"system"); Label1.Text = ds.Tables["system"].Rows[0]["YourColumn"].ToString(); Label1.DataBind();这样吗? lable 一般不用绑定数据集 弱弱的问一个很简单的问题,WPF中ArcSegment参数Size的理解 有关调用实时(JIT)调试而不是此对话框的详细信息 WebBrowser如何设置代理服务器 table中如何根据一个字段的值取得另一个字段的值?? 怎么进行文件上传? pb中怎样读取excel中的数据 新手求教:DataView.RowFilter的过滤条件问题 谁有关于进程的资料? 怎么移除Datagrid里面的某行 DevExpress 13.1 控件,升级转换旧版本代码失败. 如何让程序发出beep的声音? 哭死,这样的问题都有,大家快过来看看呀!
还是把数据表里的一个字段值给Label1.Text
DataSet ds=new DataSet();
SqlDataAdapter Adapter=new SqlDataAdapter(SQL,Conn);
Adapter.Fill(ds,"system");
Label1.Text = ds.Tables["system"].Rows[0]["YourColumn"].ToString();
Label1.DataBind();
这样吗?
一般不用绑定数据集