|
|
 |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
 | This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

November 7th, 2009, 06:07 AM
|
|
Authorized User
|
|
Join Date: Jun 2009
Posts: 48
Thanks: 14
Thanked 1 Time in 1 Post
|
|
Chapter 7: combine Menu and SiteMapPath controls?
I would very much like to highlight the current page by a method other than breadcrumb. For example, in the Monochrome theme, if the current page is the home page, give a different background to 'Home' on the menu (and, ideally, disable the link). Is it possible to combine the Menu and SiteMapPath controls to achieve that? Or is there some other way?
|

November 7th, 2009, 06:18 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Hi there,
This should already be the case. Active menu items end up with a green background. This is done with the StaticSelectedStyle:
Code:
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" ... >
<StaticSelectedStyle CssClass="StaticSelectedStyle" />
...
</asp:Menu>
and this CSS:
Code:
.StaticHoverStyle, .StaticSelectedStyle
{
/* Defines the look of active and hover menu items */
background-color: #c1e4ce;
}
You can do the same for the sub menus:
Quote:
|
<DynamicSelectedStyle CssClass="SomeClass" />
|
with this CSS
Code:
.SomeClass
{
background-color: red;
}
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|

November 7th, 2009, 06:35 AM
|
|
Authorized User
|
|
Join Date: Jun 2009
Posts: 48
Thanks: 14
Thanked 1 Time in 1 Post
|
|
Ooops. So it does. Thanks for such a quick response. My apologies for not being more thorough before I posted.
OK, given that's possible, I shall now have a go with CSS friendly control adapters. Since the book was written, it maybe a little bit harder for novices like me to get into that - in that the Microsoft page pops you across to a codeplex page when you try to download - and the package no longer has vis installation. However, I think I am sorting it - I'll drop a note in this forum if it all works out, as a sort of supplement to the note on CSS Control adapters on page 264.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |