Re-usability of User Controls in ASP.NETUser controls are the way to go if you want more functionality added to your controls. There might be cases in your application where you might need more functionality and this functionality might be repeated on several pages of the web application. If you face such a scenario then creating and using a user control is the best option. It is easy to combine different existing controls in a user control page. This page has the extension .ascx. Small blocks of code that are often used in a web application can also be converted to user controls if needed. You have to make sure that it is going to reduce the development time drastically. For using a user control, you have to register it in the page you are using and then use it in the web page. Use the @register directive at the top of the page to register the user control. You can also convert an existing web page to user control, if you are going to call that page often within another page.
|