数据列表中的复选框动态 [英] checkbox in datalist dynamically

查看:54
本文介绍了数据列表中的复选框动态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框,按钮和数据列表.一旦我在文本框中编写并单击添加btn复选框,就应该在数据列表中添加复选框.

我尝试过这种方法,但是没有用

i have one textbox,button, and datalist.as soon as i write in textbox and click on add btn checkbox should be added in datalist.

i tried this way but it did not work

CheckBox chk = new CheckBox();
       dtsites.Controls.Add(chk);



[edit]添加了代码块[/edit]



[edit]code block added[/edit]

推荐答案

http://forums.asp.net/t/1210234.aspx/1 [ http://www.mikesdotnetting.com/Article/66/Referenceencing-CheckBoxes-in-GridView-Repeater-and-DataList-controls [ http://blog.eriklane.com/post/2004/12/29/Check-All-Checkboxes-in-a-DataList-using-ASPNET-and-C.aspx [
http://forums.asp.net/t/1210234.aspx/1[^]
http://www.mikesdotnetting.com/Article/66/Referencing-CheckBoxes-in-GridView-Repeater-and-DataList-controls[^]
http://blog.eriklane.com/post/2004/12/29/Check-All-Checkboxes-in-a-DataList-using-ASPNET-and-C.aspx[^]


这篇关于数据列表中的复选框动态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆