C # 3.5: How to get the dynamic name of the parent class from UserControl?
For instance,
If TestPage.aspx contains a UserControl ucTestUc ,
I need to know that the parent class is TestPage.
I tried: from ucTestUc ,
this.Parent.NamingContainer - ASP.testpage_aspx.
Which is close but no cigar.
I could get rid of the prefix and postfix, but I have no way to restore capitalization.
?
source
share