Tuesday, September 2, 2014

What is a User Control?

The base "UserControl" is nothing but a Custom Control that you derive to create a control UI specific to your project. Generally, we create a UserControl which is placed inside a ASPX page with tight bonding to the code behind. You can directly access its UI elements from the code-behind and do some specific operations.

A custom UserControl inherits from the System.Windows.Controls.UserControls class, which inherits from the base "Control" class.

You can't create theming support for UserControls but can style them by creating themes for the child Custom Controls because they represent a collection of controls. Once you create a UserControl UI in one project, you can't change it in other projects.

No comments:

Post a Comment