H
Holger (David) Wagner
Hi all,
I'd like to have several "skins" for an application that are
"structurally different" (i.e. controls at different locations, some
controls visible only in a particular "skin"). The application is
implemented with a single default.aspx which loads a couple of
ascx-Controls (navigation, contents depending on parameter and so on).
Now, an obvious approach is simply duplicating the ascx-Files into an
own directory structure which resembles the original directory
structure, but keeping the codebehind files (*.ascx.cs) at the original
location (and only once, as the functionality should remain the same and
I don't uselessly duplicate code).
I can then "switch skins" by simply changing the path in the default.aspx.
This approach works fine for the running application, but VS.NET 2003
doesn't like it very much - at least not for the designer. I've tried
changing the path to the code behind file so that it is correct, but
still it says it cannot load the code behind file (it does work for the
original ascx-file, with a path like ../../../<pathback> which would be
the same in the "other skin directory").
Is there any way to go with this approach and still use the designer?
Would be using an alternative tool (e.g. Dreamweaver) solve this problem?
Is there a different, possible more elegant approach to this? I'd do
this with different CSS style sheets if the structure wasn't so different...
kind regards and thanks a lot for any help,
david
I'd like to have several "skins" for an application that are
"structurally different" (i.e. controls at different locations, some
controls visible only in a particular "skin"). The application is
implemented with a single default.aspx which loads a couple of
ascx-Controls (navigation, contents depending on parameter and so on).
Now, an obvious approach is simply duplicating the ascx-Files into an
own directory structure which resembles the original directory
structure, but keeping the codebehind files (*.ascx.cs) at the original
location (and only once, as the functionality should remain the same and
I don't uselessly duplicate code).
I can then "switch skins" by simply changing the path in the default.aspx.
This approach works fine for the running application, but VS.NET 2003
doesn't like it very much - at least not for the designer. I've tried
changing the path to the code behind file so that it is correct, but
still it says it cannot load the code behind file (it does work for the
original ascx-file, with a path like ../../../<pathback> which would be
the same in the "other skin directory").
Is there any way to go with this approach and still use the designer?
Would be using an alternative tool (e.g. Dreamweaver) solve this problem?
Is there a different, possible more elegant approach to this? I'd do
this with different CSS style sheets if the structure wasn't so different...
kind regards and thanks a lot for any help,
david