User Controls - Web vs. WinForms

M

Mark

What is the difference between a "user control" for Web Forms vs. Windows
Forms? I have extensive use of user controls (.NET 1.1) in Web forms. Just
wondering how they differ for Windows Forms.

Thanks.
 
S

simida

a) By extending ContainerControl, UserControl inherits all the standard
positioning and mnemonic-handling code that is necessary in a user
control.The UserControl gives you the ability to create controls that
can be used in multiple places within an application or organization.

a usercontrol from winform renders it's apparentness by GDI or GDI+.

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.ContainerControl
System.Windows.Forms.UserControl

b) A usercontrol from webforms, it represents an .ascx file, also known
as a user control, requested from a server that hosts an ASP.NET Web
application. The file must be called from a Web Forms page or a parser
error will occur.

a usercontrol from webform renders it's apparentness by Html elements
based on browser


System.Object
System.Web.UI.Control
System.Web.UI.TemplateControl
System.Web.UI.UserControl

Reference from MSDN.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top