MasterPage有自己的生命周期
Page有自己的生命周期和
UserControls有自己的生命周期.
UserControls有助于划分工作负载并且易于维护,但UserControls会降低asp.net应用程序的等级性能吗?
解决方法
但是,如果您正在讨论优化到处理器周期,我猜他们不会因为一切都被编译成MSIL,然后编译到机器代码,所以我猜测编译器可以将其排序并将其处理用户控件与您直接在页面上拥有所有组成控件没有什么不同.
编辑 – 添加
This article争论他们如何才能真正提高绩效.有趣.
In addition to their reusability and
flexibility,Web user controls can
take advantage of the ASP.NET caching
engine to implement what is referred
to as “fragment caching.” Essentially,
fragment caching allows a Web
developer to control the HTML caching
of individual controls on a page,
including setting the duration and
caching varIoUs versions of the
control based on query string,control
properties,browser type,and even
custom strings. The ability to cache
only portions of pages is powerful
since a portion of a page will often
access relatively static data stored
in a relational database or accessed
through an XML Web service,while
other portions of the same page
manipulate dynamic data. For these
static portions,creating a Web user
control and setting caching options
greatly reduces the number of database
round trips,thereby increasing
performance. In most instances,using
ASP.NET caching judicIoUsly is the
single biggest performance improvement
that can be made.
好问题.我再一次学到了新东西.谢谢.