![]() |
2
1
看看 implementing ITemplate interface
|
![]() |
3
0
为什么不放弃服务器控件,使用C#switch语句呢。您只需将其包装在代码标记中。
|
![]() |
4
0
我不久前也有类似的要求,我做了类似的事情:
受保护的TypedTemplate GetTemplate(对象数据项) { if(dataItem==null) { } { 类型itemType=dataItem.GetType(); { 返回模板; } 返回null; }
其中TypedTemplateCollection是TypedTemplate类的StateManagedCollection:
而TypedTemplateRepeaterItem是:
|
![]() |
5
0
这个 MSDN 该网站有一个简单明了的模板示例,在您的案例中,它看起来确实是一种方式。 |
|
heika · 数据绑定列表框和设置css类 12 年前 |