UserControl,WebControl,RenderedControl和CompositeControl有什么区别? [英] What is the difference between UserControl, WebControl, RenderedControl and CompositeControl?

查看:76
本文介绍了UserControl,WebControl,RenderedControl和CompositeControl有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么区别,正式术语是什么,在ASP.NET 3.5中是否有过时的术语?

What is the difference, what is the official terms, are any terms obsolete in ASP.NET 3.5?

推荐答案

UserControl :以.ascx结尾的自定义控件,由其他Web控件组成.它几乎就像是aspx网页的小版本.它由一个UI(ascx)和背后的代码组成.不能通过引用DLL在其他项目中重用.

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 :托管在网页或UserControl中的控件.它由一个或多个串联工作的类组成,并托管在aspx页或UserControl中. WebControl没有UI页面",必须直接呈现其内容.通过引用其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 :不存在.可能是WebControl的同义词.可能表明控件是直接写到HttpResponse而不是呈现到aspx页面.

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 :介于UserControl和WebControls.它们像UserControls一样编码,因为它们是由其他控件组成的.没有任何用于控件合成的图形UI,并且必须由控件设计人员编码对CompositeControls UI编辑的支持.合成是在后面的代码中完成的. CompositeControls可以在WebControls等其他项目中重用.

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.

这篇关于UserControl,WebControl,RenderedControl和CompositeControl有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆