A UserControl has a Parent property, which you can use to get a reference to
the parent. If you then cast this as the type of your parent class, you can
access any public members of that class.
....
ParentPage myParent = this.Parent as ParentPage;
if (myParent != null) {
myParent.SomeMethod();
}
....
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Joe Fallon" <jf******@nospamtwcny.rr.com> wrote in message
news:et******************@TK2MSFTNGP12.phx.gbl...
What is the code to read a field value of the Parent Page from an embedded
User Control?
I can use reflection to get it, but I thought there would be an easier
way.
--
Joe Fallon