HELP: Visual Studio + Dreamweaver, Page Inheritence + Templates

M

Mark

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?
 
M

Mark

For those that are interested, I have decided to ditch Dreamweaver in favour
of the User Controls functionality that is in Visual Studio. This integrates
perfectly with Visual Studio and provides similiar functionality to
Dreamweaver templates.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top