最新下载
热门教程
- 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.google.com")
URLs.Add("MSN", "http://search.msn.com")
URLs.Add("Yahoo", "http://www.yahoo.com")
URLs.Add("Lycos", "http://www.lycos.com")
URLs.Add("AltaVista", "http://www.altavista.com")
URLs.Add("Excite", "http://www.excite.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
相关文章
- 王者荣耀侦探能力大测试攻略 王者荣耀侦探能力大测试怎么过 11-22
- 无期迷途主线前瞻兑换码是什么 11-22
- 原神欧洛伦怎么培养 11-22
- 炉石传说网易云音乐联动怎么玩 11-22
- 永劫无间手游确幸转盘怎么样 11-22
- 无期迷途主线前瞻兑换码是什么 无期迷途主线前瞻直播兑换码介绍 11-22