Home arrow ASP.NET arrow Page 5 - Create a Simple, Cross-Browser, Dropdown Menu User Control with C#

Create a Simple, Cross-Browser, Dropdown Menu User Control with C#

In this article, Nick Howard will demonstrate the use of an ASP.NET user control coded in C#. In order to accomplish this task, a variety of technologies will be utilized including XML, XSL/XSLT, CSS and JavaScript.

Author Info:
By: Wrox Team
Rating: 4 stars4 stars4 stars4 stars4 stars / 158
November 05, 2002
  1. · Create a Simple, Cross-Browser, Dropdown Menu User Control with C#
  2. · What are ASP.NET User Controls?
  3. · Control Design
  4. · Using the Control
  5. · Conclusion

print this article

Create a Simple, Cross-Browser, Dropdown Menu User Control with C# - Conclusion
(Page 5 of 5 )

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.

Good Luck!
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.

blog comments powered by Disqus

- How Caching Means More Ca-ching, Part 2
- How Caching Means More Ca-ching, Part 1
- Reading a Delimited File Using ASP.Net and V...
- What is .Net and Where is ASP.NET?
- An Object Driven Interface with .Net
- Create Your Own Guestbook In ASP.NET
- HTTP File Download Without User Interaction ...
- Dynamically Using Methods in ASP.NET
- Changing the Page Size Interactively in a Da...
- XML Serialization in ASP.NET
- Using Objects in ASP.NET: Part 1/2
- IE Web Controls in VB.NET
- Class Frameworks in VB .NET
- Cryptographic Objects in C#: Part 1
- Sample Chapter: Pure ASP.Net

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials