dropdownlist绑定
来源:互联网 发布:演唱会门票 知乎 编辑:程序博客网 时间:2024/04/28 17:32
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection myconnection = new SqlConnection("server=(local);database=Northwind;uid=sa;pwd=");
string sql = "select categoryName from categories";
SqlDataAdapter sda = new SqlDataAdapter(sql,myconnection);
DataSet ds = new DataSet();
sda.Fill(ds,"a");
DropDownList1.DataSource = ds.Tables["a"];
DropDownList1.DataTextField = "categoryName";
DropDownList1.DataBind();
{
SqlConnection myconnection = new SqlConnection("server=(local);database=Northwind;uid=sa;pwd=");
string sql = "select categoryName from categories";
SqlDataAdapter sda = new SqlDataAdapter(sql,myconnection);
DataSet ds = new DataSet();
sda.Fill(ds,"a");
DropDownList1.DataSource = ds.Tables["a"];
DropDownList1.DataTextField = "categoryName";
DropDownList1.DataBind();
- dropdownlist绑定
- 绑定dropdownlist
- dropdownlist 绑定
- Dropdownlist绑定
- 绑定DropDownList
- DropDownList 的数据绑定
- DataGrid动态绑定DropDownList
- 动态绑定Dropdownlist
- 动态绑定dropdownlist
- DropDownList 绑定数据库
- DropDownList绑定DataTable
- 动态绑定DropDownList
- 绑定DropDownList和GridView
- GridView绑定DropdownList
- 树型dropdownlist的绑定
- DropDownList绑定枚举类型
- dropdownlist 动态绑定数据
- DataGrid内绑定DropDownList
- 一个最珍贵的故事——职场人不得不看
- CMM解释
- 开始『我的工具』课堂
- 希腊字母表及中文发音
- 关于 Active Server Pages 和 Microsoft 数据访问组件中的 80004005 错误的疑难解答
- dropdownlist绑定
- Win Vista使用教程之UAC详细使用方法
- JFreeChart完全攻略示例各种方法和属性
- phobos 调试 javascript
- 【名词解释】CRUD
- grub
- C语言高效编程的的四大绝招
- OKOK
- Thinking in C++ (1-8) 极限编程