Listbox data binding

zhaozj2021-02-16  61

private void ImageButton1_Click (object sender, System.Web.UI.ImageClickEventArgs e) {if (ListBox1.Visible == false) {SqlClass1 sqlc = new SqlClass1 (); dr1 = sqlc.ReaderSql ( "select * from siji"); ListBox1 .Datasource = DR1; ListBox1.DataTextField = "sj_name"; listbox1.datavaluefield = "sj_id"; listbox1.database (); listbox1.visible = true;} else {listbox1.visible = false;}}

转载请注明原文地址:https://www.9cbs.com/read-18065.html

New Post(0)