RadioButtonList邦定数据
来源:互联网 发布:淘宝直播间是什么东西 编辑:程序博客网 时间:2024/04/28 23:47
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string name = Request.QueryString["votename"];
Label1.Text = name;
string id = Request.QueryString["voteid"].ToString();
SqlConnection sqlcn = new SqlConnection("Data Source=.;Initial catalog=voet;Integrated security=true");
sqlcn.Open();
SqlCommand sqlcmd = new SqlCommand("select * from dbo.ItemInformation where voteId=" + id, sqlcn);
DataTable dt = new DataTable();
dt.Load(sqlcmd.ExecuteReader());
RadioButtonList1.DataSource = dt;
RadioButtonList1.DataTextField = "selectName";
RadioButtonList1.DataValueField = "selectId";
RadioButtonList1.DataBind();
sqlcn.Close();
RadioButtonList1.SelectedIndex = 0;
}
}
- RadioButtonList邦定数据
- [我的ASP.net学习历程]CheckBoxList和RadioButtonList的数据梆定
- RadioButtonList的数据绑定故事
- treeview 动态邦定数据
- RadioButtonList
- RadioButtonList
- RadioButtonList
- RadioButtonList控件绑定数据时设定默认值
- RadioButtonList绑定后台数据,触发点击事件
- DataGridView数据邦定方式的改变
- DataFormatString 属性(datagrid数据邦定)
- c#中数据邦定7法
- asp.net repeater数据邦定
- GridView里面的HYPERLINK数据邦定
- 整定数据
- 数据词典和约定
- GridView模版列中根据数据动态添加RadioButtonList项
- asp.net 中的 window.open()和邦定数据
- 【转】Socket基础知识分享
- Eclipse 启动不起来异常:JVM terminated. Exit code=-1
- uva 442
- A new version of hibernate spring jpetstore has been released
- Internet Explorer and Connection Limits
- RadioButtonList邦定数据
- volatile——编写多线程程序的好帮手
- 麦克风音量小 按钮灰色 不可调节 没有高级控制选项 的问题[转]
- HDU 1588(数论,构造二分矩阵+求幂运算+二分求和)
- 清华学生告诉你什么是清华!
- csdn貌似编辑做得很好....
- css selector简介
- 西安实习悟道~~1,2天
- 一些图论、网络流入门题总结、汇总