动态生成如下:
//1 view += @"<br>
<asp:CheckBoxList id='check" + j + @"' runat='server' RepeatDirection='Horizontal'><asp:ListItem Value='A'>A</asp:ListItem></asp:CheckBoxList>
<br>";
//2 Control b = ParseControl(view);
//3 this.PlaceHolder1.Controls.Add(b);取值:CheckBoxList lg = (CheckBoxList)this.PlaceHolder1.FindControl("'check1");取出来是null,怎么回事啊????????
//1 view += @"<br>
<asp:CheckBoxList id='check" + j + @"' runat='server' RepeatDirection='Horizontal'><asp:ListItem Value='A'>A</asp:ListItem></asp:CheckBoxList>
<br>";
//2 Control b = ParseControl(view);
//3 this.PlaceHolder1.Controls.Add(b);取值:CheckBoxList lg = (CheckBoxList)this.PlaceHolder1.FindControl("'check1");取出来是null,怎么回事啊????????
解决方案 »
- order by排序
- macnine.config和web config有什么关系呀
- 新手用笨办法解决问题时遇到的问题......
- 为什么每次调用showModalDialog,都显示无法找到该页?
- Java脚本 document.getEleMentById('ReadBook').initcomm(); 错误在哪?在线等
- 求救贴,有空的麻烦拉。
- 问一个弱弱的问题,急,在线等
- The directory '/App_Code/' is not allowed because the application is precompiled. 这个是什么错误信息啊?
- 关于框架页面的刷新问题
- :(
- 网站上传服务器问题!!
- C#.net使用报表控件ATGrid源码 csdn下载
-------------------------------------------
MSN:[email protected]
请给我与您交流的机会
-------------------------
首先,你这样添加的控件在页面上显示出来了没有。把你动态加载控件的代码贴出来!!!
//1 view += @"<br>
<asp:CheckBoxList id='check" + j + @"' runat='server' RepeatDirection='Horizontal'><asp:ListItem Value='A'>A</asp:ListItem></asp:CheckBoxList>
<br>";
//2 Control b = ParseControl(view);
//3 this.PlaceHolder1.Controls.Add(b);
Request.Form["check"]更简单