Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
考虑两个执行基本相同操作的控件。例如,具有分页、排序和数据缓存的类似 gridview 的小部件。两者都绑定了相同的 10,000 行数据源。一个是自定义服务器控件,一个是用户控件。有什么理由会在性能上有所不同吗?
只是想知道社区会考虑这个问题。
假设 2 个控件包含相同的代码,则不会有任何性能差异。它们之间的区别只是代码的编译方式(用户控件直接编译到 Web 应用程序的 dll 中,而服务器控件编译到它们自己的 dll 中),以及它们何时编译(由它们自己或与 Web 应用程序一起编译)。
编译后,它们就像任何其他类一样。