The goal was to create a simple user ASP.NET control that was not only immediately useful, but easily (and highly) extensible. We have used XML to store hierarchical data (in this case the menu structure), XSL/XSLT to transform our data into another form of XML - HTML, CSS to liven up the menu's display (with nice fonts and colors) and JavaScript to manipulate the menu control (in multiple browser types no less). And finally, we implemented its functionality in an ASP.NET user control.
It may seem that by reaching the goal you have also come to the conclusion of your journey, however, it's really just the beginning. There are a number of things you can do in order to improve your user control and make it more robust. For instance, you could address code behind file compilation so only the .ascx and .dll files need to be deployed as part of a web application (most of us don't want our code out there for everyone to see). You could extend your control's public property list to include runtime setting of the CSS filename or set the name of a folder where the .xsl, .css and .js files used to create, display and manipulate our control are stored (so you can dynamically generate the <link /> and <script /> tags in the .ascx file). You could allow for more than one menu control per page (the XSL is limiting this as of now). You could change menu item text based on some run-time criteria. The list goes on and on. It's really up to you.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |