Last post Aug 05, 2006 02:31 PM by Russ Helfand
Aug 05, 2006 09:49 AM|RBrown|LINK
Part A: I read in another post that it is not possible with the current version of the adapters to have multiple menu controls display different looks on the same page. I haven't tried it yet, but I am about to. I have a nice looking horizontal menu in
the master page that is working great. Now I want a to make an asp:menu controls exhibit a "tabbed" look on one of the content pages that inherits from the master page. Can't I use a skin file to change the second asp:menu to accomplish a "tabbed" look?
Part B: Anybody have a Skin that achieves a nice looing tabbed control effect that thay want to share [:)]?
Aug 05, 2006 11:20 AM|Russ Helfand|LINK
You may, in fact, be able to accomplish what you described. The limitation you alluded to isn't exactly what you described. It's that you can't have the adapter render unordered lists (for the menu) in one case but, say, tables in another case. The adapter
is always going render the menu as an unordered list.
That said, you can easily have multiple instances of <asp:Menu> on a page and give each of them completely different looks depending on the CSS applied to them.
For example, look at the kit's menu sample page. Notice that the menu at the top of the page is completely different looking than the two that are being exemplified in the center of that page. That's accomplished by using different values for the CssSelectorClass
attribute on the <asp:Menu> tag. The CssSelectorClass is used to set the class of a <div> that wraps the whole unordered list. So, your CSS selectors can differentitate between instances of <asp:Menu> and style them uniquely and differently.
Getting one of your menus to look like tabs is a matter of setting the right border properties in CSS and use tag-like images for the backgrounds of the <li> tags produced by the menu adapter.
Take a look at this article,
http://www.webcredible.co.uk/user-friendly-resources/css/css-round-corners.shtml. Maybe it can get you pointed in the right direction.
Aug 05, 2006 01:34 PM|RBrown|LINK
Great answers, thanks! I figured the CssSelectorControl would do the trick, I was just a little confused by that other post I read.
Also, not sure why ANYBODY would want to render the table tags in place of the adapter generated <div>s...I was shocked at how verbose they were [:O]. That said, I'm sure somebody can find a good reason for them.
By the way, is there an Adapter forum strickly related to CSS design styles here yet? I haven't looked yet but will in a minute. Would love to discuss how others are achieving their look and feel for menus, tabs, grids, ...etc. IMHO, that is the only
thing now that some of these third party controls still have over the asp:menu and CSS approach. These 3rd party controls (like the Component Art controls used in this forum) come bundled with predefined looks that make it easy for developers to get up and
running with a looks that suits their needs. It would be awesome to have this ability with the asp:menu as well.
Thanks again for the response, keep up the great work Russ!
Aug 05, 2006 02:31 PM|Russ Helfand|LINK
Have you seen this?
I think it's supposed to evolve into a robust portal for the kind of design-centric ASP.NET-centric info and resources that you mentioned. I agree that there is TREMENDOUS value in these pre-baked design solutions. In a sense, that is what you find here,
http://msdn.microsoft.com/asp.net/reference/design/templates/default.aspx. It would be cool to see templates like these that are especially easily styled with great CSS (perhaps even using the adapters).