0

I have a series of .NET 2.0 web pojects that have identicle code behind in their web pages. The only thing that is different is how the html is laid out.

Is there a way that I can have a main web project that holds all the code behind (including control events like button click) and so that the other web projects reference the web page code file to this project's code files?

Edit: Note that the changes in html include exclution of certain controls, I am catoring for this by using the FindControl method so that if the control doesnt exists, I would simply have a null value.

2 Answers 2

3

You may try putting all the code-behind classes into a library and inheriting from a common base-class.

Sign up to request clarification or add additional context in comments.

1 Comment

But then I would lose events like page load, no?
0

You can take a look at "Skin File" file type of Visual Studio. On the other hand you can learn if it works for you from the address below:

http://msdn.microsoft.com/en-us/library/ykzx33wh(VS.80).aspx

1 Comment

Thing is that the html varies as in as to where the controls are laid out and some of them might not necessarily be included

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.