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

类别:Asp 点击:0 评论:0 推荐:
            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://com.8s8s.com/it/it7524.htm