We mainly use user controls when we need to use similar functionality in different places of the application. Just as we use the master pages for the consistent appearance of the application, similarly to avoid repeating the same functionality and user interface throughout the application, we use usercontrols. There may be much more use, but I only know this ...
For example, suppose your site has 4 user levels, and for each user there are different pages in different directories with different access mechanisms. Suppose you request address information for all users, and then create address fields such as Street, City, State, Postal Code, etc. On each page. This will be a recurring job. Instead, you can create it as an ascx file (ext for a user control), and in this control place the necessary user interface and business code to add / update / delete / select the role of the address, and then simply specify the entire necessary page.
So, with thoughtful user controls, you can avoid repeating code for each role and creating a user interface for each role.
Amit Ranjan Mar 07 '11 at 10:45 2011-03-07 10:45
source share