You are here:   Home > Asp.net
  |  Login

Programmer Newsletter

Minimize

Master Programmer

Minimize

Find articles on computer software, programming, ASP.net, Sql server, databases, C#, websites, Internet, Windows, Outlook macros.

Programming Articles

Minimize
12

When using the Asp.net Menu Control to display a horizontal menu, you might want to add a bar between menu items, like this:

Item1 | Item2 | Item3 | Item4

There is no property in the Asp.net Menu Control to let you set a separator.

If you are using an Xml file for your menu control, the easiest way to add the separator is to put the separator in your Xml file, like this.

<menu>
<menuitem title="Item1" url="item1.aspx" />
<menuitem title="|" url="" />
<menuitem title="Item2" url="item2.aspx" />
<menuitem title="|" url="" />
<menuitem title="Item3" url="item3.aspx" />
</menu>

The separator will show as a link, but clicking on it will not do anything.

Posted in: Asp.net

Post Rating

Comments

Peter
# Peter
Tuesday, November 22, 2011 1:21 PM
For the dropdown menu, you can use the following code to draw the horzontal line as separator.



I hope it can help anyone who want to draw the separator.

Post Comment

Only registered users may post comments.

Programmer Newsletter

Minimize

Subscribe to the Internet Handholding newsletter



Reccomend Programmer.bz

Minimize

Share/Bookmark Bookmark and Share