中继器项数据绑定

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了中继器项数据绑定相关的知识,希望对你有一定的参考价值。

  1. protected void rptMyRepeater_ItemDataBound(Object Sender, RepeaterItemEventArgs e)
  2. {
  3. if (this.showEmployerControls)
  4. {
  5. if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
  6. {
  7. MyCustomClass resultItem = (MyCustomClass)e.Item.DataItem;
  8. // do stuff here
  9. }
  10. }
  11. }

以上是关于中继器项数据绑定的主要内容,如果未能解决你的问题,请参考以下文章