load的时候让dropdownlist显示特定的值

发表于:2007-06-30来源:作者:点击数: 标签:
DDLTitle.Items.Insert(0, "0") ‘’给下拉框添加记录
DDLTitle.Items.Insert(1, "5%")
DDLTitle.Items.Insert(2, "10%")
DDLTitle.Items.Insert(3, "15%")
DDLTitle.Items.Insert(4, "20%")
Dim TitleListItem As ListItem
‘’StrDDLTitle是下拉框中需要显示的内容
For Each TitleListItem In DDLTitle.Items ‘’遍历下拉框中所有的选项
If TitleListItem.Value = StrDDLTitle Then
TitleListItem.Selected = True
txtTitle.Text = TitleListItem.Text
End If
Next


原文转自:http://www.ltesting.net