Friday, July 31, 2009

How can i create a RadioButtonList array(asp.net 1.1)(c#)?

i want to create a RadioButtonList array at run time,but i think the .net 1.1 does'nt have this ability.

How can i create a RadioButtonList array(asp.net 1.1)(c#)?
Sure it does. You can even assign it to a specific place on your page by creating a panel at the location you want it to appear.





RadioButtonList myList = New RadioButtonList


myList.Items.Add( New ListItem( "Item1", 1)


myList.Items.Add( New ListItem( "Item2", 2)


myList.SelectedIndex = 1





myPanel.Controls.Add(myList)


No comments:

Post a Comment