You are a member of a team of developers creating several ASP.NET applications for XYZ. You want to create a reusable toolbar that will be used in each of the applications. The toolbar will be displayed at the top of each page viewed by the user.
The contents of the toolbar will vary depending on options each user selects when creating a profile.
You want to be able to add the toolbar to the ASP.NET toolbox for each of the developers on your team.What should you do?
Answer & Explanation
A) Create a new Web Control Library project. Create the toolbar within a Web custom control.
Web custom controls are compiled code, which makes them easier to use but more difficult to create. You can add a Web custom control to the Toolbox and display it in a visual designer with full Properties window support and all the other design-time features of ASP.NET server controls.
B: Web user controls are easy to make, but they can be less convenient to use in advanced scenarios such as this. Because Web user controls are compiled dynamically at run time they cannot be added to the Toolbox
C: A Web form would be inadequate.
D: The Component class Provides the base implementation for the IComponent interface and enables object-sharing between applications. It does not fit in this scenario.