摘要:
DropdownList绑定的两种方法动态绑定方法一:动态绑定数据库中的字段。SqlConnection conn = UtilitySqlClass.OperateDataBase.ReturnConn();string strSQL = "select * from CompanyType";SqlDataAdapter ada = new SqlDataAdapter(strSQL, conn);DataSet ds = new DataSet();ada.Fill(ds, "CompanyType");DropDownList1.DataSour 阅读全文
posted @ 2011-08-12 14:07
甜菜波波
阅读(199)
评论(0)
推荐(0)
摘要:
DropDownList1.Items.Add(new ListItem(dr["status"].ToString(), dr["status_Id"].ToString()));里面的两个参数 都必须是 string类型的,第一个参数是text,第二个参数是value 阅读全文
posted @ 2011-08-12 14:05
甜菜波波
阅读(231)
评论(0)
推荐(0)
摘要:
this.DropDownList1.Items.FindByValue(ViewState["hit"].ToString()).Selected = true; 阅读全文
posted @ 2011-08-12 09:45
甜菜波波
阅读(118)
评论(0)
推荐(0)

浙公网安备 33010602011771号