Anatoly,
Thanks for the reply...yes, if i maybe would have used a few more of my
limited neurons, I would have seen this! Incidently, do you think its better
to declare a private field in the UserControl class, do the cast once
assigning the base property to this field and use the private field within
the UserControl class. Will it save some performance not having to make the
cast everytime I want to use a base class property.?
Thx
Mike
"Anatoly" <an*****@hotmail.com> wrote in message
news:uO**************@tk2msftngp13.phx.gbl...
UserControl.Page return reference to Page object contains this control.
Since you use another class for your page you must cast this property to
your page class:
For example
if your base page class named MyBasePage
((MyBasePage)MyUserControl.Page).[my base page property/method]
HTH
"Mikip" <mi***@plugthenet.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi,
I have some properties that are common to all pages so I have created a
base class which every page inherits from. I now also want to use these
properties within User Controls on the page. Is there any way to get to
these properties through the parent property of the user control - I
can't seem to figure out how to get there. If I can't do this, do I have to do
the same thing as the page and create a base user control class with the
same code in - Seems silly to have to execute the same code twice on a page?
Thanks in advance for any help
Mike