How can I test for a certain control within a repeater footer to change one of its attributes? here is what I tryed and it didn't work:
I'm guessing the test e.Item.ID == ... is not right but I have looked for an example and can't find how to test which control has just been created.
Code:
protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Footer)
{
if (e.Item.ID == "ListMinusImageButton")
{
if ((int)ViewState["ListCount"] > 0)
{
e.Item.Visible = true;
}
else
{
e.Item.Visible = false;
}
}
else if (e.Item.ID == "ListAddTextBox")
{
TextBox tb = (TextBox)e.Item.FindControl("ListAddTextBox");
tb.Text = "";
}
}
}