献给大家拜早年,在问个问题大家发财呀
exee 2003-01-26 10:38:54 我在Page_Load中给PlaceHolder动态加了几个控件其中包括RadioButtonList
如
RadioButtonList rbl = new RadioButtonList();
rbl.Items.Add(new ListItem("C." + drKaonet["c"].ToString(), "C"));
.
.
.
PlaceHolder1.Controls.Add(rbl);
然后在button_click中找到控件RadioButtonList
写法如下
foreach(Control conAll in PlaceHolder1.Controls)
{
string type = conAll.GetType().Name.Trim();
switch(type)
{
case "RadioButtonList":
RadioButtonList rbl = (RadioButtonList)conAll;
.
.
.
}
但是却说对象未引用到实例,为什么???