We Recommend

Accelerated C# 2008 Accelerated C# 2008
This book is both a rapid tutorial and a permanent reference. You’ll quickly master C# syntax while learning how the CLR simplifies many programming tasks. You’ll also learn best practices that ensure your code will be efficient, reusable, and robust. Why spend months or years discovering the best ways to design and code C# when this book will show you how to do things the right way, right from the start?


Posted By

Anthony on 09/16/08


Tagged

event repeater binding


Versions (?)


Repeater ItemDataBound


Published in: C# 


  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. }

Report this snippet 

You need to login to post a comment.