Create a Simple, Cross-Browser, Dropdown Menu User Control with C#
Create a Simple, Cross-Browser, Dropdown Menu User Control with C# (Page 1 of 5 )
Every web site or intranet application needs some form of navigation device. Often you will see static links to subordinate pages that need to be included on each and every page of a site. When you are dealing with a site of modest proportion, this method of inclusion may be adequate. If a menu change needs to be made, only a handful of pages need to be edited and updated. When your site starts to become a little more unwieldy, as your page count increases or your navigation becomes more complex, this method of upkeep starts to become a more difficult undertaking.
Even when I was developing DOS-based applications, the first course of action included the development of a reusable menu control that could be easily ported between the different apps we were developing. (This included peeking into screen memory, saving the current contents and swapping in the menu text.) Now with the Internet, the need is the same, if not greater, due to the dynamic nature of the web itself. Therefore, a dynamic, flexible, extensible and easy-to-use method of displaying menu text is a bare necessity. In this article, you will see an example of the design, development and deployment of a horizontal dropdown menu user control.