如何得到页面上所有的CheckBoxlist啊 急!! rt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 foreach (Control ctrlTemp in this.Controls) { if (ctrlTemp.GetType().Name == "CheckBoxlist") { ; } } foreach (Control ctrlTemp in this.Controls) { if (ctrlTemp.GetType().Name == "CheckBoxList") { dm.SetModelValue(type, "TypeName", (ctrlTemp as CheckBoxList).ToolTip); Dictionary<string, string> key = new Dictionary<string, string>(); key.Add("ParentId", type.Code); (ctrlTemp as CheckBoxList).DataSource = dm.GetDataTableDese(type, key, 30, "Code"); (ctrlTemp as CheckBoxList).DataBind(); } }不对啊 If语句根本就不进去啊 我都是用panel存放控件,临时改了一下foreach (Control ctrlTemp in Panel1.Controls) 哎呀,来迟了一步,foreach (Control con in this.Page.Controls) { if (con.GetType() = typeof(LinkButton)) { //如果控件是LinkButton } } 怎么放?我用了Checkboxlist list = {this.checkboxlist1,this.checkboxlist2};他报错 我加了个panel 读是读出来了 为什么第一个就不显示呢?我打断点看了下 第一次If没有进去 怎么回事... this.Controls 改成 page试试 请教FCKeditor.Net_2.6.3使用方法 asp.net调用dll问题,很急 关于sessionid值改变的问题 _____前台调用后台函数的出错,谢谢 取数据库,得不到真实的值 [精华&原创]可按任意字段排序的分页存储过程(不用临时表的方法,不看全文会后悔) 用户控件问题 从ASP向ASP.NET过度应该从那些方面改进,编程规范还有其它方面吗 急急急急!!!关于表单提交与直接在浏览器中键入地址的问题 从客户端(TextBox1="<script language="ja...")中检测到有潜在危险的 今早来上班,发现一个奇怪的事~ 这个SQL语句该怎么写,求大侠指教!!!
foreach (Control ctrlTemp in this.Controls)
{
if (ctrlTemp.GetType().Name == "CheckBoxlist")
{
;
}
}
{
if (ctrlTemp.GetType().Name == "CheckBoxList")
{
dm.SetModelValue(type, "TypeName", (ctrlTemp as CheckBoxList).ToolTip);
Dictionary<string, string> key = new Dictionary<string, string>();
key.Add("ParentId", type.Code);
(ctrlTemp as CheckBoxList).DataSource = dm.GetDataTableDese(type, key, 30, "Code");
(ctrlTemp as CheckBoxList).DataBind();
}
}
不对啊 If语句根本就不进去啊
foreach (Control ctrlTemp in Panel1.Controls)
{
if (con.GetType() = typeof(LinkButton))
{
//如果控件是LinkButton
}
}
他报错