What is the difference between UserControl, WebControl, RenderedControl and CompositeControl?

What is the difference between UserControl, WebControl, RenderedControl and CompositeControl?,第1张

概述What is the difference between UserControl, WebControl, RenderedControl and CompositeControl? UserControl: A custom control, ending in .ascx, that is composed of other web controls. Its almost like a What is the difference between UserControl,WebControl,RenderedControl and CompositeControl?

UserControl: A custom control,ending in .ascx,that is composed of other web controls. Its almost like a small version of an aspx webpage. It consists of a UI (the ascx) and codebehind. Cannot be reused in other projects by referencing a DLL.

WebControl: A control hosted on a webpage or in a UserControl. It consists of one or more classes,working in tandem串联的,and is hosted on an aspx page or in a UserControl. WebControls don‘t have a UI "page" and must render their content directly. They can be reused in other applications by referencing their DLLs.

RenderedControl: Does not exist. May be synonymous to WebControl. Might indicate the control is written directly to the httpResponse rather than rendered to an aspx page.

CompositeControl: Inbetween UserControls and WebControls. They code like UserControls,as they are composed of other controls. There is not any graphical UI for control compositing,and support for UI editing of CompositeControls must be coded by the control designer. Compositing is done in the codebehind. CompositeControls can be reused in other projects like WebControls.  

 

扩展阅读

System.Web.UI.UserControl

System.Web.UI.WebControls.WebControl

System.Web.UI.WebControls.CompositeControl

总结

以上是内存溢出为你收集整理的What is the difference between UserControl, WebControl, RenderedControl and CompositeControl?全部内容,希望文章能够帮你解决What is the difference between UserControl, WebControl, RenderedControl and CompositeControl?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1081876.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-27
下一篇2022-05-27

发表评论

登录后才能评论

评论列表(0条)

    保存