I'm using the codeplex cross-site collection navigation project as a basis. The problem should not be related to that specifically though.
I'm using Microsoft.SharePoint.WebControls.AspMenu as my navigation provider. In my masterpage I include a webpart that basically only collects some data (links) and creates and adds an AspMenu-control to the page. This all works fine, except one minor thing: The 'selected' class is never applied (it should be applied to the current/selected menu item). All the other classes (like 'static', 'dynamic', 'dynamic-children' etc.) are applied correctly to the menu list items.
SharePoint OOTB masterpage uses the same navigaton provider, except they include it directly in the masterpage, while I'm including a webpart that adds the menu control to the masterpage. Should be the same thing.
There seems to be some options available to configure this, but they are not working. For instance, it's possible to set the AspMenu's StaticSelectedStyle.CssClass, but the css class is never applied to the menu items.
Does anyone have a workaround for this problem?