5
Reply

Difference between Custom Control and User Control??

Poonam Jain

Poonam Jain

15y
30.9k
1
Reply

    UserControl : A control which can reuse the Components in the Applications. The control can be defined in both Xaml and Code-Behind. CustomControl : An UserInterface element that have a distinct behavior which is said as CustomControl.

    https://www.youtube.com/watch?v=6P-ipCQGxBw

    Hi Poonam,

    plz go through it.

    Usercontrol:
    1) User control can be used for the Reusable purpose only.
    2) Once you create User control that can be access in current project.
    3) User control extenction is .ascx file.
    4) It can be visible in Solution explorer.
    5) It is Locally used.If you want used this control in any page just drag and drop from Solution or Register that particular page like
    <%@ Register TagPrefix="scott" TagName="header" Src="Controls/Header.ascx" %>
    <%
    Custom Control:
    1) Custom control can used for Globale purpose like Tollbox controls.
    2) custom control can created extenction file is .dll .
    3) It can Add to Toolbox like
    Right click on toolbox add->choose itemes->select path of file.
    4) custom control If you want used in any forms just you can drag and drop like normal control.

    Thanks,

    Narasima

    hi user control- they are reusual software component which can be use in multiple apps.they design according to our requrement.

    Hi,

    Poonam,

    What are user controls?

    User controls are custom, reusable controls, and they use the same techniques that are employed by HTML and Web server controls. They offer an easy way to partition and reuse common user interfaces across ASP.NET Web applications. They use the same Web Forms programming model on which a Web Forms page works.

    What are custom controls?

    Custom controls are compiled code components that execute on the server, expose the object model, and render markup text, such as HTML or XML, as a normal Web Form or user control does.

    Nikhil Kumar