HEXAQ : A friendly question - answer site for IT professionals

Which is better method to register usercontrol(.ascx) on each page or in web.config ?


I am revamping a website that has a lot of user controls and pages.

I found that some user controls are registered in each page and some usercontrols are registered in web.config.

It is still not clear to me that which method is better to register controls.

What are pros and cons of both methods?


≡ Total 1 Answer


There is absolutely no major different in performance of your website or application.

You can consider following:

Advantage to register user control in web.config:

  • A controls registered once in web config can be used across the website. No need to mention anywhere else.
  • Reduces errors for relative path of each control

Advantage of registering user control in each page:

  • Only those controls are registered those you need on your page. No need to worry about other controls.

I haven't seen any other difference in both methods.


Enter your reply here
Answer Preview:
Viewed: 694 times
Asked on: 7/16/2013
Topics in this question
Search Question
Similler Questions