DropDownlist 选中

1.DropDownlist.SelectedIndex=DropDownlist.Items.IndexOf(DropDownlist.Items.FindByValue(initValue));

2.  foreach(   ListItem   item   in   dropdownlist.Items   )  
  {  
      if   (   item.value   ==   ID   )  
      {  
          item.Selected   =   true;  
          break;  
      }  
  }

posted @ 2010-01-29 10:09  eastday  阅读(335)  评论(0编辑  收藏  举报