locked
custom control use RRS feed

  • Question

  • User2068347733 posted

    I am sure some of u have used custom controls in your appln.

    But under what situation, you have used a custom control. Custom control is used when u need to reuse in multiple appln only no?

    So is it normally used in product development environment only?

    Friday, June 11, 2010 6:05 AM

Answers

  • User-1179452826 posted

    If something needs to be used enough times across projects, then yes - I have used custom controls. If it's something small and relatively project specific, I tend to use user controls. Some custom controls I've created for myself from scratch include a jquery powered menu, a widget control to hold content etc. Some custom controls I find myself using a lot are derivatives of ObjectDataSource. If there's a control that's basically a server control (like dropdownlist) with some properties set, then I'd create that by deriving from dropdownlist and setting those properties (a countries dropdownlist comes to mind). That derived control is also a custom control.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 11, 2010 9:28 AM

All replies

  • User-1179452826 posted

    Custom controls can promote reuse of UI components and are a vital part of complex applications. While user controls are easier to develop, cusom controls can be packaged in a single dll, added to the VS toolbox and can be released without exposing any source code. And they should be reusable across projects with zero or minimal configuration. Various companies like Telerik and DevExpress ship a number of useful custom controls.

    Friday, June 11, 2010 6:24 AM
  • User2068347733 posted

    Thanks... And I know this...

    Can u mention any case u used it realtime? I mean u created one from scratch.

    Do u mean it is only/mostly used in the product dev?


    Friday, June 11, 2010 7:05 AM
  • User-1179452826 posted

    If something needs to be used enough times across projects, then yes - I have used custom controls. If it's something small and relatively project specific, I tend to use user controls. Some custom controls I've created for myself from scratch include a jquery powered menu, a widget control to hold content etc. Some custom controls I find myself using a lot are derivatives of ObjectDataSource. If there's a control that's basically a server control (like dropdownlist) with some properties set, then I'd create that by deriving from dropdownlist and setting those properties (a countries dropdownlist comes to mind). That derived control is also a custom control.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 11, 2010 9:28 AM
  • User-2004844803 posted

    One thing off using custom web controls are the fact that they can be reused but in my opinion the main aspect is that it allows you build complex controls that hides thier implementation and logic for the developer using them. Allowing a web developer to use them as any other web control in the asp.net framwork.Since you gain both off these advantages you can absolutely create and use web controls even if you use them in only one application.

    In my company we use web controls in all our projects. as an example we use componentes from Telerik where we actually has our own implementation off the Telerik RadGrid where we add and extend behaviours in thier grid. We also has a big number off web controls that are custom made for our customers.


    Monday, June 14, 2010 3:17 AM