Interview Questions

What are the differences between User control and Web control and Custom control?

.NET Database ,COM interop,and .NET deployment questions and answers


(Continued from previous question...)

What are the differences between User control and Web control and Custom control?

Answer1:
Usercontrol-> control that is created as u wish.
Web Control-> any control placed in web page (web application page)
Custom Control-> same as user control with some difference.

user control custome control
1.easy to create difficult
2.no full suport for customers using
Visual studio tools Full support
3. Seperate copy of the control in each
assembly only one copy in global assembly.
4. best for static layout best for dynamic layout.


Answer2
User control
1) Reusability web page
2) We can’t add to toolbox
3) Just drag and drop from solution explorer to page (aspx)
4) Good for static layout
5) Easier to create
6) Not complied into DLL

Custom controls
1) Reusability of control (or extend functionalities of existing control)
2) We can add toolbox
3) Just drag and drop from toolbox
4) You can register user control to. Aspx page by Register tag
5) A single copy of the control is required in each application
6) Good for dynamic layout
7) Hard to create
8) Compiled in to dll

Custom controls
1) Reusability of control
2) Pre defined Control
3) Just drag and drop from toolbox

(Continued on next question...)

Other Interview Questions