Utilizing the power of Custom Server Controls

   Throughout my website, I have made good use of Custom Server Controls to encapsulate the specialized formatting for each display. For this project I created Custom Server Controls for my work experience and education, and gave these Controls the intelligence to handle the complex data formatting required to correctly display these objects. By using these controls, I am freed from having to repeat the formatting for each data object. Instead the logic is centralized within the control and re-used with each item to be displayed.

    For example, when I retrieve my work experience from the database, I create a Company object for each company I have worked for. Each of these Company Objects contains a collection of Project Objects, which in turn contain Task items. The repetitious formatting of all this data would be both cumbersome and bug prone. Instead, to display the information for each company, I create one of my Custom Server Controls and pass it the Company object to be displayed. The Control then formats the data into the appropriate HTML for display.

Go Back