Thanks a lot for that. That seems to be exactly what I need. I've had a look around for some tutorials, but I can't find one to sort my next problem out.
How do I access the columns within the my data table? This was created in a previous method.
For example, I need to somehow say
if Penalty > 0 then add "(Pen)" after the goal scorer's name
This is the code I have so far:
Code "Csharp":
protected void Goal_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
// Return if NOT the following logic for Items and Alternating Items.
if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType !=
ListItemType.AlternatingItem)
return;
Label hsLbl = (Label)e.Item.FindControl("homeScorerLabel");
}
I know I can access table columns as: ds.Tables["HomeGoals"].Columns["Penalty"], but I can't seem to call "HomeGoals" in the event method Goal_ItemDataBound. Do you know how I can do this?
Bookmarks