开发者

Using include files in asp.net

How can I used inclu开发者_StackOverflow社区de files (as used in classic asp) in asp.net 3.5 framework?


You should use User Controls instead.

To share server-side code between pages, you should add C# classes to the App_Code folder.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜