When creating your control, add the name to it:
Filter Filter1 = new Filter();
Filter1.Name = "Filter1";
If this is WinForms and Filter1
is the name of the Filter control, it would just be:
if (tp.Controls.ContainsKey("Filter1"))
{
Filter selectedFilter = (Filter)tp.Controls["Filter1"];
}
Debug.Write(selectedFilter.Value);