Performance between user controls and custom controls

Discussion in 'ASP .Net Web Controls' started by link45809, Feb 6, 2008.

  1. link45809

    link45809 Guest

    Hi,
    I have a question.
    Anyone know if there is a difference in performance between a user control and a custom control?
    Thanks.


    Source: http://www.codeverge.net
     
    link45809, Feb 6, 2008
    #1
    1. Advertisements

  2. Hi,

    Custom Controls and User Controls have different purposes. You can easily
    distribute your Custom Controls just by distributing the assembly but User
    Controls will always need the ASCX file. Also Custom Controls don't support
    visual development but User Controls do support it.

    So I don't think comparing their performance would be correct in this
    situation.

    If you tell me more about your purpose, I would like to help you more in
    detail.

    --
    All the best,
    Coskun SUNALI
    MVP ASP/ASP.NET
    http://sunali.com
    http://www.propeople.dk
     
    Coskun SUNALI [MVP], Feb 6, 2008
    #2
    1. Advertisements

  3. link45809

    link45809 Guest

    Hi Coskun,
    thanks for your response. I understand the difference of distrubution and visual studio development of user controls and custom controls. I guess what I was wondering was that if I convert my existing user controls to custom controls, would I gain any performance for that extra work?
    Thanks.



    Source: http://www.codeverge.net
     
    link45809, Feb 6, 2008
    #3
  4. link45809

    Angel Guest

    This question has been asked many time and the reponse is --

    Well written user control will execute just as good as an equivalent custom
    control. The end game is to emit HTML so in a sense the user controls should
    be faster but that's not necessarily the case. What you can be sure of is
    that you will not suffer a performance loss using a well designed user
    control.

    Hope this helps,
     
    Angel, Feb 6, 2008
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.