site templating...how?
-
I was wondering if there is a way in VS.net to setup site templates similar to how you accomplish this in Dreamweaver, for example, so that you could make changes to one page that would propegate to the other pages of the site as well... Anyone know how to do this??? I actually tried setting templates up in Dreamweaver and then doing my dynamic code in VS.net, but when I made changes in VS.net and tried to go back to Dreamweaver and make changes to the template, i get errors.... Thanks cavall "Nothing is at last sacred, but the integrity of your own mind." "What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
-
I was wondering if there is a way in VS.net to setup site templates similar to how you accomplish this in Dreamweaver, for example, so that you could make changes to one page that would propegate to the other pages of the site as well... Anyone know how to do this??? I actually tried setting templates up in Dreamweaver and then doing my dynamic code in VS.net, but when I made changes in VS.net and tried to go back to Dreamweaver and make changes to the template, i get errors.... Thanks cavall "Nothing is at last sacred, but the integrity of your own mind." "What lies behind us and what lies before us are nothing compared to what lies within us." - Ralph Waldo Emerson
In ASP.NET 2.0, you will be able to accomplish this type of thing using Master Pages: http://msdn2.microsoft.com/library/wtxbf3hh.aspx[^] In ASP.NET 1.1, you can take a couple of approaches. One is to use UserControls (defined in .ascx files), which in this context would be analogous to a web include file. Another approach would be to create your own subclass of the
Page
class, then base your webforms on the subclass. There are lots of examples of both approaches out there. Here are a few: http://www.xefteri.com/articles/show.cfm?id=20[^] http://authors.aspalliance.com/mamanze/articles/?path=pagetemplate3[^] http://authors.aspalliance.com/wisemonk/view.aspx?id=AN090302-All[^]