国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

datalist控件顯示數(shù)據(jù) DropDownList怎樣與數(shù)據(jù)庫中的數(shù)據(jù)綁定?

DropDownList怎樣與數(shù)據(jù)庫中的數(shù)據(jù)綁定?第一步:連接數(shù)據(jù)庫第二步:取得數(shù)據(jù)/第三步:為其指定數(shù)據(jù)源第四步:指定其text和value值。第五步:綁定參考代碼:SqlConnection co

DropDownList怎樣與數(shù)據(jù)庫中的數(shù)據(jù)綁定?

第一步:連接數(shù)據(jù)庫第二步:取得數(shù)據(jù)/第三步:為其指定數(shù)據(jù)源第四步:指定其text和value值。第五步:綁定參考代碼:SqlConnection con3=new SqlConnection("Server=.user id=sapassword=123456Database=FABS") con3.Open() SqlCommand cmd3=new SqlCommand() cmd3.CommandText="select * from sheng" cmd3.CommandType=CommandType.Text cmd3.Connection=con3 SqlDataReader sdr3=cmd3.ExecuteReader() DropDownList1.DataSource =sdr3 DropDownList1.DataTextField = "shengming" DropDownList1.DataBind() con3.Close()