最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DropDownList 控件 DataTextField 和 DataValueField 分开绑
时间:2008-01-19 编辑:简简单单 来源:一聚教程网
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
-
上一个: 将ASP的Debug变得简单的两个函数!
相关文章
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- ajax实现城市三级联动的代码介绍 09-16
- asp中获取日期为星期几的技巧 09-14