code_junkie

ASP.Net RadioButton visibility inside a RadioButtonList

Nov 10th, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. RadioButtonList.Items(1).CssStyle.Add("visibility", "hidden")
  2.  
  3. RadioButtonList.Items.Add("Item Name" or index);
  4. RadioButtonList.Items.Remove("Item Name" or index);
  5.  
  6. foreach(ListItem myItem in rbl.Items)
  7. {
  8. if(whatever condition)
  9. myItem.Attributes.Add("visibility","hidden");
  10.  
  11. }
  12.  
  13. RadioButtonList.Items.Remove(RadioButtonList.Items.FindByValue("3"));
Add Comment
Please, Sign In to add comment