动态将控件添加到Listview [英] Dynamically add controls to Listview

查看:87
本文介绍了动态将控件添加到Listview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用ASP.NET 3.5,并尝试以编程方式将数据绑定到Listview中.每行我必须添加一个标签和超过5个子标签(取决于数据库值)才能显示信息.

因此,必须动态绑定listview.请让我知道如何实现.

谢谢,

Vasanth

Hi,

i am working on ASP.NET 3.5 and trying to bind data into Listview programmatically. Per row i have to add one label and morethan 5 child labels (which depends on database value) to display the information.

So, the listview has to be binded dynamically. Please let me know how to achieve it.

Thanks,

Vasanth

推荐答案

不清楚您要尝试什么,请查看以下链接:
示例示例1 [此处 ="http://msdn.microsoft.com/en-us/library/aa289501.aspx" target ="_ blank" title ="New Window"> ^ ].
Not very clear on what you are trying, have a look at this link:
Sample Example 1[^]

In case you are looking at how to have templates programmatically then have a look here[^].


这篇关于动态将控件添加到Listview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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