I am working with the listview control. By default I am showing the itemtemplate with an edit button. When the edit button is pressed the listview switches to the edititemte
I usually use the ItemDataBound Event... check the other options in ListItemType Enum
protected void UnitLV_ItemDataBound(object sender, DataListItemEventArgs e) { if (e.Item.ItemType == ListItemType.EditItem) { ListBox myListBox = (ListBox) e.Item.FindControl("ListBox3"); } }