all groups > dotnet windows forms > july 2006 >
You're in the

dotnet windows forms

group:

User Controls - Web vs. WinForms


User Controls - Web vs. WinForms Mark
7/27/2006 1:50:28 PM
dotnet windows forms:
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.

Re: User Controls - Web vs. WinForms simida
7/27/2006 10:33:58 PM
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.

[quoted text, click to view]
AddThis Social Bookmark Button