• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1002
  • Last Modified:

How to Create Dropdown Menu in Web Application

I am new in VB.Net and have a littlie bit knowledge I want to develop Web application with Dropdown menu could any body guide me how can it possible.
0
Mehram
Asked:
Mehram
  • 5
  • 3
  • 2
  • +1
1 Solution
 
pzmatekCommented:
It doesn't matter if you use VB or whatever else.
Dropdown menus are usually made by using css or javascript.
You just put the code inside your presentation file.

Just browse google for "html dropdown menu"
0
 
CarlosMMartinsCommented:
Try the example from www.w3schools.com at http://www.w3schools.com/html/tryit.asp?filename=tryhtml_select2

<html>
<body>

<form>
<select name="cars">
<option value="volvo">Volvo
<option value="saab">Saab
<option value="fiat">Fiat
<option value="audi">Audi
</select>
</form>

</body>
</html>


0
 
pzmatekCommented:
Guys, are you talking about dropdown lists or menus?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
CarlosMMartinsCommented:
oops. misread the question sorry.

For menus, yes, CSS and javascript.
Have a look at http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm
for an example.
0
 
liviutudorCommented:
it's as simple as using some DIVs and absolute positioning combined with probably CSS display:none/display:inline and some javascripts. any search on a major search engine for this would bring loads of results.
0
 
MehramAuthor Commented:
What is DIVs and how can use this?
0
 
CarlosMMartinsCommented:
If you follow the link I provided in my previous post, you'll find an example, and step by step instructions on how to get it running.
Basically you place your menu elements inside DIVs that are tags defining a division/section in a document.
So, you can control those "elements" via Javascript, toggling their visibility, positioning, etc.
0
 
MehramAuthor Commented:
I want to use this code on my VB.Net project could you guide me were it will be paste

<div id="chromemenu">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="#" onMouseover="cssdropdown.dropit(this,event,'dropmenu1')">Resources</a></li>
<li><a href="#" onMouseover="cssdropdown.dropit(this,event,'dropmenu2')">News</a></li>
</ul>
</div>

<!--1st drop down menu -->
<div id="dropmenu1" class="dropmenudiv">
<a href="http://www.dynamicdrive.com/">Dynamic Drive</a>
<a href="http://www.cssdrive.com">CSS Drive</a>
<a href="http://www.javascriptkit.com">JavaScript Kit</a>
</div>

<!--2nd drop down menu -->
<div id="dropmenu2" class="dropmenudiv" style="width: 150px;">
<a href="http://www.cnn.com/">CNN</a>
<a href="http://www.msnbc.com">MSNBC</a>
</div>

Rgds.
Mehram
0
 
CarlosMMartinsCommented:
First you need the support files, with the javascript, css, and images.
As mentioned on the site, you can find them at http://www.dynamicdrive.com/dynamicindex1/chrome/chromemenu.zip
donwload that package, unzip it to a test folder, and have a look at the demo.htm file.

Basically you just need to put these lines in the <HEAD> section of your html:

<link rel="stylesheet" type="text/css" href="chrometheme/chromestyle.css" />
<script type="text/javascript" src="chromejs/chrome.js">
/***********************************************
* Chrome CSS Drop Down Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>

And then add the other part (the one you posted above) in tnside the <Body> section
(that's exactly what you'll see in the demo.htm file)
0
 
MehramAuthor Commented:
Dear Sir, this is my first test but your provided detail is really helpfull for me I would must be appreciate your cooperation. Sir if i face any problem i further need your assistance. Tks. Mehram
0
 
CarlosMMartinsCommented:
we're here to help. :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now