A Base page in ASP.NET

后端 未结 5 1087
一向
一向 2021-02-08 06:04

Do you recommend from every web site created in Visual Studio, that you should create a Base page that serves as the parent class?

What are the exact benefits/drawbacks?

5条回答
  •  梦毁少年i
    2021-02-08 06:49

    If you need common functionality on all your pages that belongs to the page class, create a common base class.

    If you don't need such common functionality on all your pages, don't create a common base class.

    If you can't decide, having a base class isn't going to hurt anybody, so you might as well have one (I'd say you more often end up needing some common functionality than not)

提交回复
热议问题