Reputation: 1669
How can I used include files (as used in classic asp) in asp.net 3.5 framework?
Upvotes: 1
Views: 797
Reputation: 44916
These were used in classic ASP to simulate a lack of any inheritance model, or composability. In ASP.Net you can use inheritance to create common functionality. Master Pages for common layout, and user controls for composability.
Inheritance will work in all three of these situations as well.
MyPage: BasePage
MyControl: BaseControl
MyMasterPage: BaseMasterPage
You have a lot of options with ASP.Net because it is built on top of an Object Oriented framework.
Upvotes: 0
Reputation: 888223
You should use User Controls instead.
To share server-side code between pages, you should add C# classes to the App_Code
folder.
Upvotes: 2