Ayup
I may be asking a dumb question, but I have a customer for which I need to create many websites (10+) (ASPN 3.5) which will be the same code for all the pages of each site, but the site will launch in different areas and there will be different content while following the same template. .
I have created and launched Site 1, and sites 2, 3 & amp; 4 is almost alive, but it happens to me that as all the sites are basically identical, updating the code is going to be more complex because it will be repeated, so if I have to fix a bug on a site If needed, then I will need to fix it on all the websites (and it is becoming complicated.)
I was thinking that in any way to create the current library of existing aspx.cs files possible , Make reference to DLL in each website and then get these sections in .aspx.cs files. Therefore, default.aspx will still have the codefile of "Default.aspx.cs" in each site, but default.aspx.cs will receive a corrupt class from a DRL:
using WebPagesClass ; Public Partial Class _Default: WebPagesClass._Default {} The reason for doing so is that if I have to change any code on a specific website (for example, for minor changes in languages ), I can override page functions and change the required parts. For all other pages, which I do not have, I can only copy from one website.
Is it possible to be ambiguous? If anyone has not got any suggestions from the killer how to manage so many websites from a single codebase?
Cheers T
You can do this. But you will need to make sure that your base class meets the system. Web.Page.
Then create a library, add the necessary reference (system web, etc.) and create your base class:
Public class MyBasePage: System.Web.Page {} < / Code> Then you can specify that for all your other pages as your base class
for all your aspx pages, the code as the back-end square To use this single class, it can be difficult because the probability of the pages is their own personal a The sp.net control is on them, and therefore the code behind each page will actually be slightly different.
I think you want to do this because pages have a bunch of similar codes, but I think there are some specific code / control announcements too. So I will prepare the base class and put the common code there, and it will pass only that class ...
Comments
Post a Comment