|
Answer» A custom control is a loosely coupled control which can be used across various APPLICATIONS. We need to only include its REFERENCE (.dll) to the project and it can be added to your toolbox.You can also keep it inside a class library.
Main difference between User Controls and Custom Controls are:
- UC is specific to your application but CC can be used across various applications.
- 2. CC can be added to your application toolbox but UC cannot be added to the toolbox.
- CC defines UI in a Resource Dictionary whereas UC defines UI as a normal xaml page.
- To create a UC just add a new WEBFORM and add its reference to your page by declaring @REGISTER directive. But to create a CC we need to add then folder of the "wwwRoot" directory.Assemblies "System.Web.UI.Control" or "System.Web.UI.WebControls.WebControl". After the CC is created we need to add the dll into the BI
A custom control is a loosely coupled control which can be used across various applications. We need to only include its reference (.dll) to the project and it can be added to your toolbox.You can also keep it inside a class library. Main difference between User Controls and Custom Controls are:
|