Cybercrux

Everything is achievable through technology

Repeter

Repeter Item DataBound working sample

protected void Repeater1_OnItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem item = e.Item;
if (item.ItemType == ListItemType.AlternatingItem || item.ItemType == ListItemType.Item)
{
Literal lit_Age = (Literal)item.FindControl("lit_Age");
if (String.IsNullOrEmpty(lit_Age.Text))
{
Literal lit_Name = (Literal)item.FindControl("lit_Name");
Literal lit_Notes = (Literal)item.FindControl("lit_Notes");
lit_Age.Text = "-";
lit_Notes.Text = lit_Name.Text + "'s age is unknown.";
}
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s