473,516 Members | 3,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Working with <asp:menu...


Hello,
Does someone know a link to an example of customization of an asp:menu?

Many thansk in advance.
S
May 3 '07 #1
13 3334
"Smith" <Sm***@pricateemail.comwrote in message
news:Og**************@TK2MSFTNGP05.phx.gbl...
Does someone know a link to an example of customization of an asp:menu?

1) Launch your Internet browser (e.g. IE, FireFox, Opera, Netscape etc)

2) Navigate to http://www.google.com

3) Enter the following text in the box:

<asp:Menu

4) Hit the button
--
http://www.markrae.net

May 3 '07 #2
Here is a more specific question. I searched google and did not fidn a way
to do this.
I have the folowing in the stylesheat of the theme i use for my application:
a:LINK { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
12px; color: #003399}

a:ACTIVE {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:HOVER {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:VISITED {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #666666;

}

But i do not want this to applly to my <asp:menu control in the master
page.

I tried to set the different properties in the menu definition e.g.

DynamicHoverStyle-ForeColor="white"

but the above has not effect. Can someone tell me how to achive this?

Thanks

S
May 3 '07 #3
"Smith" <Sm***@pricateemail.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
But i do not want this to applly to my <asp:menu control in the master
page.

I tried to set the different properties in the menu definition e.g.

DynamicHoverStyle-ForeColor="white"

but the above has not effect. Can someone tell me how to achive this?
I do that by using separate styles...

1) Create a separate style just for the menu:

..MenuHoverStyle
{
color:white;
}

2) Reference it

<asp:Menu ID="mnuMenu" runat="server"
StaticHoverStyle-CssClass="MenuHoverStyle"
DynamicHoverStyle-CssClass="MenuHoverStyle">
--
http://www.markrae.net

May 3 '07 #4
1) Create a separate style just for the menu:
>
.MenuHoverStyle
{
color:white;
}

2) Reference it

<asp:Menu ID="mnuMenu" runat="server"
StaticHoverStyle-CssClass="MenuHoverStyle"
DynamicHoverStyle-CssClass="MenuHoverStyle">
--
http://www.markrae.net
Great,
That sounds brillant.

I will give it a try
Thanks
S
May 3 '07 #5

I use the following
..MenuHoverStyle

{

color:white;

background-color:Black;
}

I was expeting the menu text to be black. It doesnt. What is wrong with my
style?

StaticHoverStyle-CssClass="MenuHoverStyle"


May 3 '07 #6
Sorry, the menu text to be white and not black.
May 3 '07 #7
"Smith" <Sm***@pricateemail.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
I use the following
.MenuHoverStyle

{

color:white;

background-color:Black;
}

I was expeting the menu text to be white. It doesnt. What is wrong with my
style?
Hmm - nothing as far as I can see... What colour is it, AAMOI...?
StaticHoverStyle-CssClass="MenuHoverStyle"
Do you not have any dropdown menus...? If you do, you need to set the
DynamicHoverStyle-CssClass property too...

--
http://www.markrae.net

May 3 '07 #8
Do you not have any dropdown menus...? If you do, you need to set the
DynamicHoverStyle-CssClass property too...

--
http://www.markrae.net
The menu color folow the a:Link definiton of tyhe stylesheet ...
a:LINK { font-family: Verdana, Arial, Helvetica, sans-serif; font-size:
12px; color: #003399}

a:ACTIVE {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:HOVER {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #0033FF;

}

a:VISITED {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #666666;

}

It does work when i remove these styel from myn .css file.

What can i do to have both?


May 3 '07 #9
"Smith" <Sm***@pricateemail.comwrote in message
news:uj*************@TK2MSFTNGP04.phx.gbl...
It does work when i remove these styel from myn .css file.
That's interesting...
What can i do to have both?
I'm afraid I don't know...

If it helps, this works for me:
body
{
background-color:white;
font-family:Verdana, Arial, Sans-Serif;
font-size:9px;
font-weight:normal;
text-decoration:none;
overflow:auto;
margin-left:0px;
margin-right:0px;
margin-top:0px;
margin-bottom:0px;
}
..button
{
background-color:#0099FF;
border-color:white;
border-style:ridge;
border-width:1px;
color:white;
}
td
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
submit
{
background-color:#0099FF;
border-color:White;
border-style:ridge;
border-width:1px;
color:White;
}
input
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
select
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
textarea
{
font-family:Verdana, Arial, Sans-Serif;
font-size:11px;
font-weight:normal;
text-decoration:none;
}
ul
{
margin-top:0px;
margin-bottom:0px;
}
div
{
font-family:verdana;
}
a
{
color:black;
}
a:visited
{
color:black;
}
a:hover
{
color:red;
}
..staticMenuItemStyle
{
width:60px;
height:20px;
background-color:#dcdcdc;
color:black;
display:block;
}
..dynamicMenuItemStyle
{
width:120px;
height:20px;
background-color:#dcdcdc;
color:black;
display:block;
}
..MenuHoverStyle
{
background-color:#b0c4de;
}

<asp:Menu ID="mnuMenu" runat="server" Orientation="Horizontal"
StaticMenuItemStyle-CssClass="staticMenuItemStyle"
StaticHoverStyle-CssClass="MenuHoverStyle" StaticPopOutImageUrl=""
StaticEnableDefaultPopOutImage="false"
DynamicMenuItemStyle-CssClass="dynamicMenuItemStyle"
DynamicHoverStyle-CssClass="MenuHoverStyle" DynamicPopOutImageUrl=""
DynamicEnableDefaultPopOutImage="false">
<Items>
...
</Items>
</asp:Menu>
--
http://www.markrae.net

May 3 '07 #10
Hi Mark,
That does indeed make some difference.
I will continue my work on that basis.

many thanks for your help.
S
May 3 '07 #11
"Smith" <Sm***@pricateemail.comwrote in message
news:Of**************@TK2MSFTNGP02.phx.gbl...
That does indeed make some difference.
I will continue my work on that basis.
Now I'm curious!

I'm glad that my markup worked for you, but I'd be really interested to know
why... :-)
--
http://www.markrae.net

May 3 '07 #12
Now I'm curious!
>
I'm glad that my markup worked for you, but I'd be really interested to
know why... :-)
--
http://www.markrae.net
Well,
I just removed my html tag styles and build on top of your markup adding
what i needed the appropriate places ;)
Does tha make sense?

May 3 '07 #13
"Smith" <Sm***@pricateemail.comwrote in message
news:eY**************@TK2MSFTNGP02.phx.gbl...
I just removed my html tag styles and build on top of your markup adding
what i needed the appropriate places ;)
Does tha make sense?
Not really... :-)

I'm not sure what you were doing differently to stop it working...???
--
http://www.markrae.net

May 3 '07 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
875
by: mensuur | last post by:
hi, in the top left corner of this page http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet.framework.aspnet&lang=en&cr=US is a link saying MSDN Home. the cursor will change if it is anywhere between the link text and the | a little further to the right. in my menu, the cursor will only change if the cursor is over...
2
1754
by: Mark Rae | last post by:
Hi, I'm interested in what people think of the new <asp:Menu> control in comparison to other 3rd-party menu controls. E.g. until v2, I used the AITOC FlexMenu (http://www.aitoc.com/en/flex_menu_net.html) with no significant problems. However, now that I've had a chance to evaluate the built-in <asp:Menu> control, I find that it does...
0
1344
by: chris.mcinnes | last post by:
G'day, I'm trying to implement a graphical horizontal Menu-bar feeding off a SiteMapDataSource with some top-level menu-items and a couple of sub-menus. I've managed to get the menu bar working, but noticed that the top-level items were spaced generously. Once the menu renders on the screen I find all these "margin-left=16px"
0
995
by: nick | last post by:
Is it possible to set menu item popup a window using sitemap and menu control? thanks,
2
5573
by: jason | last post by:
Does anybody know how I would get borders around each menuitem? Do I have incorportate into a table? Thanks. The below produces a border around the entire menu. <form id="form1" runat="server"> <div> <asp:Menu ID="Menu1" runat="server" BackColor="#FFC080" BorderColor="Olive" BorderStyle="Ridge" BorderWidth="1px" ForeColor="Navy"> <Items>
2
9529
by: Kevin L. Kitchens | last post by:
Howdy... Been toying the the asp:menu object in order to dump the manually generated menu I've been using, however, I cannot seem to get the coloring to work properly. First off, what CSS tags should I be setting for how the menu is eventually rendered? spans? tables? td? div? In the example below I resorted to using inline coloring...
0
1477
by: Piotr Strycharz | last post by:
Hi, I have a problem with Menu control. It seems that selected style properties (like 'StaticSelectedStyle' or 'LevelSelectedStyles / asp:MenuItemStyle' apply only to the leaf. So there is no way to have all the path "selected". Let me explain. I have menu like: - Home -- Music --- Rock
3
5343
by: kenny bones | last post by:
Hi! I'm currently working on a menu which is based on CSS and is listed with <li> tags. The CSS code looks like this: #nav { position: absolute; top: 101px; left: 390px; list-style: none; margin: 0; padding: 0;
3
2136
by: win | last post by:
I've create menu in a webform. <asp:Menu ID="Menu1" runat="server" CssClass="toolbar" Orientation="Horizontal"> <Items> <asp:MenuItem Text="Master" Value="Master"> <asp:MenuItem Text="Maintenance" Value="Maintenance"> <asp:MenuItem Text="Employee Maintenance " Value=" Employee Maintenance ">
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7548
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4773
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
825
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.