Hopefully somebody can help me with this very frustrating problem.
In Dreamweaver I have a template page and a page created from this template
called Home.aspx. In Visual Studio I have a class inherited from
System.Web.UI.Page which represents the template (including all components
and associated events defined in the template). Then I have a codebehind
file for Home.aspx that defines a class (Home) that includes controls
specific to Home.aspx only.
The problem I have is whenever I load up Home.aspx in Visual Studio, and
then select View Code - the editor automatically inserts all the controls
from the Home.aspx page straight into the class definition. This means the
controls are then duplicated since they are already defined (as Protected
members) in the class that Home inherits from. This means I have to keep
manually deleting them.
I know why it does this since the controls exist on the both the template
and the Home.aspx and VS doesn't understand Dreamweaver templates, but since
the controls are defined as Protected then why is it duplicating them! Can I
switch this auto code generation off?
--
Best regards
Mark Baldwin
Software Developer