开发者

Repeater with multiple Itemtemplate

开发者 https://www.devze.com 2023-02-27 03:34 出处:网络
How can I make a Repeate开发者_StackOverflow社区r with multiple Itemtemplates ? And a template is choosed

How can I make a Repeate开发者_StackOverflow社区r with multiple Itemtemplates ? And a template is choosed based on some condition ?


You could have a nested repeater in your repeater:

http://www.worldofasp.net/tut/NestedRepeater/Repeater_within_Repeater_193.aspx

But this starts getting really tricky! I'd take a look at what you are trying to achieve and evaluate if this is the best option.


You could always create hidden panels with different layouts in your itemtemplate. Then you could decide which one to display based on 'some condition' from your code behind. Not a very elegant solution, but the first one that sprang to mind.

0

精彩评论

暂无评论...
验证码 换一张
取 消