Welcome to the second and final part of this 2 part tutorial regarding creating a custom menu using ASP.NET’s Web Control Library projects. During Custom ASP.NET Web Menu Control Part 1 we implemented a sample ASP.NET application and created a new Web Control Library project and created our own custom control which was responsible for displaying clickable menu items.
The menu items were fully customizable and could be coded for in the code-behind files of WebForms added to our sample project. We also built the ability to perform basic UI operations such as bolding the menu items and rendering the menu items either horizontally or vertically.
In this second part of the tutorial we fill focus on one of the more complex topics of custom web controls, which is linkage to the Visual Studio designer. To really make a custom control flow like a regular web control it needs to have the capability of being visually manipulated at design time by setting properties through the properties window.
We will expand upon our example built in Custom ASP.NET Web Menu Control Part 1 and add in the following features:
- Add a Designer class to render design time presentation
- Change the control name
- Demonstrate how to render custom HTML for the Visual Studio designer
- Add a font size property
Note: Visual Studio.NET running ASP.NET 1.x is required for this tutorial. Both VB.NET and C# code samples will be provided