[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Custom Control

Definition - What does Custom Control mean?

Custom control is a control that is not included in the .NET framework library and is instead created by a third-party software vendor or a user.

Custom control is a concept used while building both Windows Forms client and ASP.NET Web applications. Custom client controls are used in Windows Forms applications, while custom server controls are used in ASP.NET pages (Web forms). Using custom controls is easier in .NET than the earlier Windows versions due to simple programming techniques.

Custom control is a generic term that also includes user controls. User control in ASP.NET is created using ASP.NET code and is reused in other Web pages, whereas user control in the context of Windows Forms implies a composite control with a consistent user interface (UI) and behavior within or across applications.

Techopedia explains Custom Control

.NET framework provides the class, System.Windows.Forms.Control, to build custom client control in Windows Forms. This class provides all the basic functionality necessary for controls, but does not provide any control-specific functionality or any graphical interface. Hence, it provides more flexibility than user control in defining the control to suit to application requirements by allowing an override of the default behavior of Windows message handling. Hence, knowledge of the Windows 32 API is essential to use this concept effectively. Windows Forms does not support windowless controls. However, it allows for the hosting of ActiveX controls, which can be windowless.

To generate custom control in ASP.NET, the framework class, System.Web.UI.WebControl, should be used along with System.Web.UI.Control to render non-visual elements. These controls provide the ability to be shipped as a dynamic link library (.dll), which can be precompiled and integrated with Visual Studio Integrated Development Environment.

Some of the aspects that need to be considered while building custom controls include the definition of properties with their default values, which need to be displayed in Visual Studio IDE, behavior in the UI layout (like tab order, UI cues, etc.), and custom events. Sometimes, custom control can be built by combining built-in controls to provide complex functionality.

It is recommended that custom controls be used when customized graphical representation of the control is needed or when there is a need to implement custom functionality that is not provided by standard controls.

This definition was written in the context of .NET

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.