几个<&ItemTemplate中GT;在一个ListView控件 [英] several <ItemTemplate> in one ListView

查看:125
本文介绍了几个<&ItemTemplate中GT;在一个ListView控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了很多的ListView使用的例子,但在一个ListView中无法找到使用两个(或更多)的ItemTemplate简单,易懂的例子(如果可能)。我想定义它们的.aspx页面或使编程,并根据我的需要选择它们(针对不同的数据绑定不同的模板)。任何想法呢?谢谢你。

I saw a lot of examples of using ListView,but couldn't found simple,understandable example of using two (or more) ItemTemplates in one ListView (if it possible).I want to define them on .aspx page or to make programmatically,and,depending on my needs choose one of them (different templates for different binding data).Any idea? Thanks.

推荐答案

我希望这会帮助你实现你想要什么?
<一href=\"http://blogs.msdn.com/b/mikeormond/archive/2008/07/26/dynamically-loading-listview-templates.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/mikeormond/archive/2008/07/26/dynamically-loading-listview-templates.aspx

I hope this would help you achieve what you want? http://blogs.msdn.com/b/mikeormond/archive/2008/07/26/dynamically-loading-listview-templates.aspx

另外通过这个帖子有一定的洞察力,以及
<一href=\"http://forums.asp.net/t/1699218.aspx/1?ListView+ItemCommand+event+not+working+with+Dynamic+Templates\" rel=\"nofollow\">http://forums.asp.net/t/1699218.aspx/1?ListView+ItemCommand+event+not+working+with+Dynamic+Templates

Also go through this post to have some insight as well http://forums.asp.net/t/1699218.aspx/1?ListView+ItemCommand+event+not+working+with+Dynamic+Templates

这篇关于几个&LT;&ItemTemplate中GT;在一个ListView控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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