Last post Feb 17, 2009 11:21 PM by Nowman
Feb 14, 2009 07:46 PM|Nowman|LINK
What is the best way to register the custom web user controls that I create? Should I register them in the web config, on the page, or in its own project and add the dll of that project to my project that contains the pages?
Feb 14, 2009 09:51 PM|Danny117|LINK
I register controls on the page that uses them. Me I'm just not comfortable changing my web.config so I keep web.config changes to an absolute minimum.
Definately keep your custom controls in their own projects.
Feb 15, 2009 12:58 PM|karthipec_gmail|LINK
We usually place all the custom controls in a separate project and add project refernce to the website. Whenever we add a new control/change the existing ones, we just buid the project alone and the reference gets updated automatically. So, when building
the website, the controls need not be built agiain and again without even a single modification.
Feb 15, 2009 04:07 PM|Nowman|LINK
Right Danny117 spoke like putting all controls in its own project and referencing that dll is a bad idea. But if you think about it, all of the controls that come with ASP are reference in a dll, right? So why not do it this way? Not sure if one way is
better than the other. Neither approach is going to slow down the application more than the other, right?
Feb 15, 2009 07:09 PM|Danny117|LINK
I didn't want the impression that referencing a dll is bad. Please reference the dll.
I just like to have a solution with lots of project references. Then I can debug everything in one place and rebuild website the new dll gets copied in. Its just how I code.
Feb 16, 2009 10:13 PM|Nowman|LINK
Why is registering all of the web user controls on the webconfig a bad idea?
Feb 17, 2009 11:21 PM|Nowman|LINK
This pretty much sums it up.'