<Itemtemplate>
模版1
</Itemtemplate>
<Itemtemplate>
模版2
</Itemtemplate>  怎么在 page_load 的时候,,if id=1 then 模版1 else 模版2 ?

解决方案 »

  1.   

    Panel and Visible.AlternatingItem.Repeater is the best Control for Designing Custom Templates.
      

  2.   

    可不可以 在 page_load 的时候动态写template 教教
      

  3.   

    或者 Repeater.Itemtemplate(0).select像这种功能有吗??
      

  4.   

    可以在 ItemDataBind方法里实现,
      

  5.   

    不可以,无论你设置多少个itemtemplate,这些itemtemplate都会在同一页面上显示出来。可以设置两个repeater,根据不同的需要显示其中的一个。