this.DropDownList1.SelectedValue ="0";

解决方案 »

  1.   

    DropDownList1.SelectedItem.Selected = False
      DropDownList1.SelectedValue = 0
      

  2.   

    同意楼上的
    不过用this.DropDownList1.SelectedValue ="0"; 时,这个“0”应该是ValueField,而不是TextField
      

  3.   

    dim x as integer=0
    for x=0 to DropDownlist1.count-1
    if DropDownlist.Items(x).Value="0" then
       DropDownlist.SelectedItem.Index=x
    end if
    next
      

  4.   


    dropdownlist.Items.FindByValue(a).Selected = True
    a为从数据库中读取的值
      

  5.   

    DropDownList1.SelectIndex = 0;
      

  6.   

    Dim item As ListItem
                For Each item In lstMainteacher.Items
                    If item.Text = reader.Item("username") Then
                        item.Selected = True
                    End If
                Next
      

  7.   

    ddl_subclassification_id.Items.FindByValue(a).Selected = True
    a为从数据库读取的值!这条语句可以表示,根据数据库中值得不同,选择dropdownlist不同的选项
      

  8.   

    dropdownlist.Items.FindByValue(a).Selected = True
      

  9.   

    dropdownlist.Items.FindByValue(a).Selected = True解决了 谢谢各位