最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DropDownList 控件 DataTextField 和 DataValueField 分开绑
时间:2022-06-30 10:20:04 编辑:袖梨 来源:一聚教程网
Sub Page_Load
If Not Page.IsPostBack Then
Dim URLs = New SortedList()
URLs.Add("Google", "http://www.g**o*ogle.com")
URLs.Add("MSN", "http://search.ms***n.com")
URLs.Add("Yahoo", "http://www.*y*ah*oo.com")
URLs.Add("Lycos", "http://www.l***ycos.com")
URLs.Add("AltaVista", "http://www.**alt*avista.com")
URLs.Add("Excite", "http://www.**excit*e.com")
'-- Bind SortedList to controls
RadioButtons.DataSource = URLs
RadioButtons.DataTextField = "Key"
RadioButtons.DataValueField = "Value"
RadioButtons.DataBind()
CheckBoxes.DataSource = URLs
CheckBoxes.DataTextField = "Key"
CheckBoxes.DataValueField = "Value"
CheckBoxes.DataBind()
DropDownList.DataSource = URLs
DropDownList.DataTextField = "Key"
DropDownList.DataValueField = "Value"
DropDownList.DataBind()
ListBox.DataSource = URLs
ListBox.DataTextField = "Key"
ListBox.DataValueField = "Value"
ListBox.DataBind()
End If
End Sub
相关文章
- 原神黄金屋宝箱在哪 04-08
- 谷歌应用网页版直达-谷歌应用商店官方入口 04-08
- 王者荣耀世界怎么登录 王者荣耀世界如何提前体验 04-08
- 163邮箱官网登录入口-163邮箱官方快捷登录 04-08
- jk漫画最新版本下载入口-jk漫画安卓官方客户端安装包下载 04-08
- 王者荣耀世界有多大 王者荣耀游戏地图与场景规模详解 04-08