Hi,
Sir i am little confuse what is the difference between user control and custom control where we use user or custom control ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Apr 17, 2012, 11:10 PM
User controls are similar to those of asp include files easy to create, can not be placed into the toolbox and dragged dropped from it. A User controls can share single application files. Normally designed to provided functionality that is reusable for the particular application.
Custom controls are compiled code(Dlls) easier to use,difficult to create and can be place in toolbox. You can drag and drop controls, Attributes of this control are visually set at design time. A custom control can be used in multiple application as shared DLLS. Any one can copy DLL of custom control in bin directory and add reference and use them. Normally custom controls are designed to provide custom functionality independent of consuming application.
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. For more details about the Web Forms programming model, visit the following Microsoft Developer Network (MSDN) Web sites:http://msdn2.microsoft.com/en-us/library/65tcbxz3(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/65tcbxz3(vs.71).aspx)
Web Forms code model
http://msdn2.microsoft.com/en-us/library/015103yb(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/015103yb(vs.71).aspx)
How to create a user control
The syntax you use to create a user control is similar to the syntax you use to create a Web Forms page (.aspx). The only difference is that a user control does not include the , , andSenthilkumarPosted Apr 17, 2012, 11:09 PM