---
title: "Write the differences between Custom Control and User Control."  
description: "Write the differences between Custom Control and User Control."  
author: "Erick Wilsom"  
published: 2022-10-21  
updated: 2023-05-30  
canonical: https://www.mindstick.com/forum/157158/write-the-differences-between-custom-control-and-user-control  
category: ".net"  
tags: [".net", "asp.net mvc"]  
reading_time: 3 minutes  

---

# Write the differences between Custom Control and User Control.

Write the [differences](https://www.mindstick.com/articles/12918/cat-5e-vs-cat-6a-understanding-the-major-differences) between [Custom](https://www.mindstick.com/blog/12298/use-custom-writing-services-to-get-through-the-finals) Control and [User Control](https://www.mindstick.com/forum/294/problem-in-access-the-control-inside-the-user-control).

## Replies

### Reply by Aryan Kumar

The main differences between custom controls and [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) controls are:

- **Compilation:** Custom controls are compiled into their own assemblies, while user controls are compiled into the assembly of the web application project that contains them. This means that custom controls can be used in multiple applications, while user controls can only be used in the application in which they are created.
- **Inheritance:** Custom controls inherit from the System.Windows.Controls.[Control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) class, while user controls inherit from the System.Windows.Controls.UserControls class. This means that custom controls have more control over their appearance and behavior, while user controls are more limited in what they can do.
- **Reusability:** Custom controls are more reusable than user controls, because they can be added to the Visual Studio toolbox and dragged and dropped onto forms. User controls cannot be added to the toolbox, so they must be added to forms manually.
- **Flexibility:** Custom controls are more flexible than user controls, because they can be modified to change their appearance and behavior. User controls are less flexible, because they cannot be modified without editing the original user control file.
- **Tight coupling:** Custom controls are tightly coupled to their code and UI, while user controls are loosely coupled to their code and UI. This means that changes to the code of a custom control will affect all applications that use it, while changes to the code of a user control will only affect the application in which it is used.

In general, custom controls are a better choice for creating reusable UI components that can be used across multiple applications. User controls are a better choice for creating UI components that are specific to a single application.

Here is a table that summarizes the differences between custom controls and user controls:

| Feature | Custom Control | User Control |
| --- | --- | --- |
| Compilation | Compiled into its own assembly | Compiled into the assembly of the web application project that contains it |
| Inheritance | Inherits from the System.Windows.Controls.Control class | Inherits from the System.Windows.Controls.UserControls class |
| Reusability | Can be added to the Visual Studio toolbox and dragged and dropped onto forms | Cannot be added to the toolbox, so must be added to forms manually |
| Flexibility | Can be modified to change their appearance and behavior | Less flexible, because they cannot be modified without editing the original user control file |
| Tight coupling | Tightly coupled to their code and UI | Loosely coupled to their code and UI |

Ultimately, the best choice of control will depend on the specific needs of the application.


---

Original Source: https://www.mindstick.com/forum/157158/write-the-differences-between-custom-control-and-user-control

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
