Understanding Custom Server Controls in ASP.NET

ASP.NET offers many server controls for the developers to create web applications. However, at some point of development time when the developer does not get the control they want, they can create a new server control. This new server control can be called ASP.NET Custom Server Controls or user control. The basic difference between a ASP.NET Custom Server Controls and a user control is that unlike a user control that does not appear in the Toolbox, you can view a ASP.NET Custom Server Controls in the Toolbox. ASP.NET Custom Server Controls have their own events such as Enter, Onclick, and Onmouseover.

ASP.NET Custom Server Controls are very handy tool to use in your web forms. User controls prove inefficient in advanced scenarios. ASP.NET Custom Server Controls are the compiled code that makes them user friendly. You should write the ASP.NET Custom Server Controls in code, thereby view it in the visual designer with full properties and design-time features. You can create a ASP.NET Custom Server Controls by inheriting one of the base control classes. These classes have all the functionality that is needed for a server control. Therefore, you just have to modify some of the programming aspects to suit your requirements.

Just as you have created a ASP.NET Custom Server Controls you can customize it too to create a unique identity. You can even consume a single ASP.NET Custom Server Controls for multiple web forms. For ASP.NET Custom Server Controls only one copy of the control is needed in the Global Assembly Cache (GAC). Moreover, ASP.NET Custom Server Controls are very helpful if you want a dynamic layout for your web application.


“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.