ASP.NET ascx vs. aspx - Do you reuse user controls?

后端 未结 4 2369
孤城傲影
孤城傲影 2021-02-20 07:26

Our team is developing a rather big ASP.NET web project which initially started in ASP.NET 1.0 and was ported several times to all new versions of .NET.

We made extensiv

4条回答
  •  半阙折子戏
    2021-02-20 08:14

    Used correctly, user controls improve maintenance and reusability, and very often are faster to create than server controls.

    You mentioned that in your previous project, very few of the user controls were reused. This seems to be more related to poor planning than an inherent flaw in user controls themselves.

    I guess a good rule of thumb would be to look at your design and see if you're using the same set of controls over and over again, in which case it does make sense to use user controls.

提交回复
热议问题