This web page has little drop down menus written in Javascript. How do I do this same thing in asp.net?
Thanks!
This web page has little drop down menus written in Javascript. How do I do this same thing in asp.net?
Thanks!
Well, ah, you can’t. ASP.NET is a server-side technology, and as such, is no good for making things happen dynamically in the browser. You can use ASP to generate the content that goes in those menus (pulled from a database, or a set of arrays, etc.), but when it comes to actually making the menu <div>s appear and disappear, you’ll need something that executes on the client side (i.e. in the browser).
You could do this with Javascript. There are tons of tutorials, freely available code libraries, and even full-on menu generators out there on the web. If you’re interested in making your site standards-compliant, and you’re not afraid of a little code, I suggest that you skip Javascript altogether and do it with CSS. Here’s an excellent tutorial to get you started.