C
Chris
This may be more of a Visual Studio question but those groups seem to
be full of unrelated stuff so hopefully this might be the right place.
I have a class (no associated aspx file) which handles all the common
startup code for the pages on our website. It is derived from
System.Web.UI.Page and every page in 2 separate projects (web
applications) derives from it. It contains several declarations of
server controls such a navigation bar that are common to all pages.
My problem is that when I open a webform that derives from the shared
base class, Visual Studio inserts declarations for the nav bar and
other controls into the code behind file for that webform even though
it derives from the base class which declares the controls itself,
hiding the underlying declaration. So at runtime when I try to acces
the controls in the start up code they are set to null because the
control in the .aspx page is not linked with the correct declaration.
It's annoying having to delete the declarations every time I open the
webform. How can I stop this or get visual studio to recognise the
underlying declarations? The declarations are all protected and I'm
using C# in Visual Studio 7.1.3038
be full of unrelated stuff so hopefully this might be the right place.
I have a class (no associated aspx file) which handles all the common
startup code for the pages on our website. It is derived from
System.Web.UI.Page and every page in 2 separate projects (web
applications) derives from it. It contains several declarations of
server controls such a navigation bar that are common to all pages.
My problem is that when I open a webform that derives from the shared
base class, Visual Studio inserts declarations for the nav bar and
other controls into the code behind file for that webform even though
it derives from the base class which declares the controls itself,
hiding the underlying declaration. So at runtime when I try to acces
the controls in the start up code they are set to null because the
control in the .aspx page is not linked with the correct declaration.
It's annoying having to delete the declarations every time I open the
webform. How can I stop this or get visual studio to recognise the
underlying declarations? The declarations are all protected and I'm
using C# in Visual Studio 7.1.3038