<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d8211560\x26blogName\x3dTech+Tips,+Tricks+%26+Trivia\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://mvark.blogspot.com/search\x26blogLocale\x3den\x26v\x3d2\x26homepageUrl\x3dhttp://mvark.blogspot.com/\x26vt\x3d-5147029996388199615', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tech Tips, Tricks & Trivia

by 'Anil' Radhakrishna
An architect's notes, experiments, discoveries and annotated bookmarks.

Search from over a hundred HOW TO articles, Tips and Tricks


HOW TO build a simple Tab Menu Control

If you need a dynamic Menu for your ASP.NET website that should show up differently for different kinds of users, you need not look beyond the ASP.NET 2.0 Menu. It has umpteen properties (over 75!) that can be set declaratively to configure beautiful standards compliant Menus with no effort at all. But if all you need is a simple static Menu to navigate through a few pages, the ASP.NET 2.0 Menu could be overkill. Instead, you can consider building your own lightweight Tab Menu Control and play as you like with it.

This Simple Tab Menu Control leverages the power of Javascript & DOM to detect the hyperlink that matches the page visitor is on and highlights it. As all the processing is done on the client-side with Javascript & CSS, it is relatively faster & light-weight. Check this no frills, bare-bones example...

If you need a lightweight multi-level static menu for your ASP.NET pages, you can adapt & wrap the Suckerfish Menu into a User Control.

Labels: , , ,

Tweet this | Google+ it | Share on FB

« Home | Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »
| Next »

»

Post a Comment