//Parent Control Recursively
private static Control FindControlParent(Control control, Type type)
{
Control ctrlParent = control;
while((ctrlParent = ctrlParent.Parent) != null)
{
if(ctrlParent.GetType() == type)
{
return ctrlParent;
}
}
return null;
}
private static Control FindControlParent(Control control, Type type)
{
Control ctrlParent = control;
while((ctrlParent = ctrlParent.Parent) != null)
{
if(ctrlParent.GetType() == type)
{
return ctrlParent;
}
}
return null;
}
No comments:
Post a Comment