CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: Date Entered: 1/25/2008 10:06:57 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 5 Views: 57 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
"sunny74" <>
NewsGroup User
Horizontal menu showing vertically1/25/2008 10:06:57 AM

0

Dear All,

I installed the CssFriendly.DLL by adding reference to it and then copied the css files in the App_Themes folder and also the .browser file in the App_browser folder.

I am facing the following problems:

1)  Initially I had the Menu.css and SimpleMenu.css in my Themes folder.Then I had MenuExample.css and Menu.css in my Themes folder.Finally I put the MainMaster.css and Menu.css in my themes folder.

All the 3 menu styles are showing the second level as dynamic and vertical.But  want the second level to be static and Horizontal.In order to have it as static and Horizontal I set

StaticDisplayLevels="2"   and

MaximumDynamicDisplayLevels="1" in the property of my main menu which I am displaying on the top of the page. But it seems that the adapter and its css files is overriding this setting.

I am struggling to have it that way for past one and half days.I do not have good knowledge of css.

My web.sitemap file looks like this:

 

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode url="~/home.aspx" title="Home" description="HOME">

<siteMapNode title="Clinical Section" description="Clinical Section" >

<siteMapNode url="~/ClinicalSection/submenu1.aspx" title="Submenu1" description="Submenu1" >

<siteMapNode url="" title="Submenuoption1" description="Submenuoption1" >

<siteMapNode url="~/ClinicalSection/subsubmenuoption1.aspx" title="SubSubmenuoption1" description="SubSubmenuoption1" />

<siteMapNode url="~/ClinicalSection/subsubmenuoption2.aspx" title="SubSubmenuoption2" description="SubSubmenuoption2" />

<siteMapNode url="~/ClinicalSection/subsubmenuoption3.aspx" title="SubSubmenuoption3" description="SubSubmenuoption3" />

<siteMapNode url="~/ClinicalSection/subsubmenuoption4.aspx" title="SubSubmenuoption4" description="SubSubmenuoption4" />

</siteMapNode>

<siteMapNode url="~/ClinicalSection/submenuoption2.aspx" title="Submenuoption2" description="Submenuoption1" >

</siteMapNode>

 

</
siteMapNode>

<siteMapNode url="~/ClinicalSection/submenu2.aspx" title="Submenu2" description="Submenu2" >

</siteMapNode>

<siteMapNode url="~/ClinicalSection/submenu3.aspx" title="Submenu3" description="Submenu3" >

</siteMapNode>

<siteMapNode url="~/ClinicalSection/submenu4.aspx" title="Submenu4" description="Submenu4" >

</siteMapNode>

</siteMapNode>

<siteMapNode title="Administration" description="Administration" >

<siteMapNode url="~/administration/submenu1.aspx" title="Submenu1" description="Submenu1" >

<siteMapNode url="~/administration/submenuoption1.aspx" title="Submenuoption1" description="Submenuoption1" >

<siteMapNode url="~/administration/subsubmenuoption1.aspx" title="SubSubmenuoption1" description="SubSubmenuoption1" />

<siteMapNode url="~/administration/subsubmenuoption2.aspx" title="SubSubmenuoption2" description="SubSubmenuoption2" />

<siteMapNode url="~/administration/subsubmenuoption3.aspx" title="SubSubmenuoption3" description="SubSubmenuoption3" />

<siteMapNode url="~/administration/subsubmenuoption4.aspx" title="SubSubmenuoption4" description="SubSubmenuoption4" />

</siteMapNode>

</siteMapNode>

<siteMapNode url="~/administration/submenu2.aspx" title="Submenu2" description="Submenu2" >

</siteMapNode>

<siteMapNode url="~/administration/submenu3.aspx" title="Submenu3" description="Submenu3" >

</siteMapNode>

<siteMapNode url="~/administration/submenu4.aspx" title="Submenu4" description="Submenu4" >

</siteMapNode>

</siteMapNode>

<siteMapNode title="MIS" description="MIS HOME" >

<siteMapNode url="~/mis/submenu1.aspx" title="Submenu1" description="Submenu1" >

</siteMapNode>

<siteMapNode url="~/mis/submenu2.aspx" title="Submenu2" description="Submenu2" >

</siteMapNode>

<siteMapNode url="~/mis/submenu3.aspx" title="Submenu3" description="Submenu3" >

</siteMapNode>

<siteMapNode url="~/mis/submenu4.aspx" title="Submenu4" description="Submenu4" >

</siteMapNode>

</siteMapNode>

<siteMapNode title="Housekeeping" description="Housekeeping" >

<siteMapNode url="~/housekeeping/submenu1.aspx" title="Submenu1" description="Submenu1" >

</siteMapNode>

<siteMapNode url="~/housekeeping/submenu2.aspx" title="Submenu2" description="Submenu2" >

</siteMapNode>

<siteMapNode url="~/housekeeping/submenu3.aspx" title="Submenu3" description="Submenu3" >

</siteMapNode>

<siteMapNode url="~/housekeepings/submenu4.aspx" title="Submenu4" description="Submenu4" >

</siteMapNode>

</siteMapNode>

</siteMapNode>

</siteMap>

 

2) Another problem is that if I use the css files alone without the adapter they don't work. Why does it happen like that?

How can I use it directly?

 

Any help that solves the problem will be gratefully accepted.

Thanks.

 

"bpw" <>
NewsGroup User
Re: Horizontal menu showing vertically1/25/2008 3:52:41 PM

0

If I understand correctly, you want the second tier of your horizontal menu to be horizontal also? I don?t think I?ve seen this before and I?m not sure the adapters will do it. If the menu items on the right of your page have submenus, you?re much more likely to disappear off the page?

I think the style/property that causes the top tier to display horizontally is in the ?Menu.css? file:

.AspNet-Menu-Horizontal ul.AspNet-Menu li
{
  float: left;
}   

Subsequent tiers will display vertically because of the following:

.AspNet-Menu-Horizontal ul.AspNet-Menu li li
{
  float: none;
}

You could try changing the latter to ?float: left? also (I?ve never tried it).

As to your second question, the script ?MenuAdapter.vb? (or .cs) writes the lists to the page and also writes the appropriate CSS classes to the lists. Have a look at the page source and you?ll see things like:

<div class="AspNet-Menu-Horizontal">
<ul class="AspNet-Menu">
 etc?

Without the Adapters the CSS files will not be loaded or referenced.

Many of the properties of the ASP.NET menu will be overridden by the adapters and will no longer have any effect.


Paul Weston
"sunny74" <>
NewsGroup User
Re: Horizontal menu showing vertically1/25/2008 6:34:59 PM

0

Hi,

Why can't I have my second tier as horizontal and static.

As you can see from my site map that HOME is my first tier folllowed by second tier items Clinical Section, Administration,MIS,Housekeeping. Now I want all these menus to be static and beside home. That is why I have selected StaticdisplayLevel = 2 and MaximumDynamicLevel = 1.

But these settings are getting overriden by the Adapter. So how can I make the adapter implement these settings. I need to implement 5 levels of menus. The first 3 are implemented using a menu control at the top(about which we are discussing) and next 2 levels using a tree view.

If I use the menu control without the Adapter I get what I want. I am using the adapter for a better look and feel.

2) Assuming that I don't get what I need using Adapters then what is the alternative. Can I use Javascript menus that are dynamic i.e fetch data from Web.Sitemap. How to do that?

3) There are some Templates given under AutoFormat. Is it possible to add more Templates to that?

4) Can I put my own stylesheet for the Adapter to implement or does it do only the ones given with it. Can you send me a few stylesheets with rounded corners and which look like Tabs. First 2 levels shud be static, horizontal  and third tier dynamic, vertical drop down.

5) Which is the fastest and best way to make dynamic menus in ASP.NET?

I got stuck with this very badly.Pls suggest a way out of this problem.

Thanks. 

 

"bpw" <>
NewsGroup User
Re: Horizontal menu showing vertically1/25/2008 7:46:48 PM

0

Sorry, I misread your post. The adapters don't support more than 1 static level. See this thread for a possible workaround:

 http://forums.asp.net/p/992059/1290922.aspx#1290922


Paul Weston
"sunny74" <>
NewsGroup User
Re: Horizontal menu showing vertically1/26/2008 5:28:46 PM

0

Hi Paul,

I got the CSSFriendly adapters to work by downloading the DLL from www.codeplex.com  and adding reference to it.Also added the .browser file and the css files in pairs(3 sets) as mentioned before.On doing this the output was as is supposed to be- as shown in the adapter website.

However there is another way to make it work as stated in the website.It says to add the .cs files under the Adapters folders in the App_code folder and then the .browser file and css files as usual.I did this with 2 sets of css files kept under a theme in the App_Themes folder.The first set is Imports.css and MenuExample.css and second set is Imports.css and SimpleMenu.css. In both cases all the three levels are coming static when only 2 levels shud be static and 1 dynamic.Besides it is disproportionate and alters the layout of the page.

I don't know what is going on & why?

When I use Menu.css and SimpleMenu.css I get to see only home with a green border, with no drop downs i.e other menus. When I use Menu.css with MenuExample.css I get to see only Home but in its original form i.e look without adapters, and no drop downs.

Why do I get such awkward output when I am not using the DLL version of the adapter? Is it bec' it doesn't work properly if the files are kept in the App_code folder and not compiled into DLL.

I saw the link you gave me.The guy SAM has given some code to make Static DisplayLevel work. How do I make those files into a DLL, because otherwise it won't properly as I told just before this. Do I need to make all those files in the App_code folder into a single DLL?

Does the code given by Sam work?

This problem is wracking my brains a lot.Pls help me to get out of this mess.

You have not answered my earlier questions in my previous post.Pls answer if you happen to know them or atleast tell that you don't know it..

Thanks.

 

"bpw" <>
NewsGroup User
Re: Horizontal menu showing vertically1/26/2008 9:08:56 PM

0

I started using the CSS Adapters for menus some time ago for a system that allows users to build their own menus. I found the basic ASP.NET menu had significant styling limitations. There?s a trade-off, as you?ve discovered.

I don?t use a web.sitemap file, I use my own XML file, so I can dictate the contents of each tier. Also, all my second+ tiers are dynamic, so I?ve never faced the issue you?re facing. So it?s unlikely I can offer you much help I?m afraid.

For my project I significantly modified my MenuAdapter.vb file to exclude a lot of the classes written to the lists, links and spans (most of which I wasn?t using) and because I found it impossible to style the ?selected? nodes (including parents/children), even with all the recommended !important CSS style-properties. Incidentally, I have my Adapter vb files in the App_Code/Adapters folder, and everything works fine.

As far as the Adapter stylesheets are concerned, you can use your own, provided (obviously) you use the selector names written to the menu elements. I remember the stylesheets I downloaded as examples were far from perfect. I suggest you get to know the selectors applied and where they are applied and gain an understanding of how the menu is influenced with each selector. It took me an age to come to terms with this myself!

Russ Helfand was the man who authored the menu adapters and he used to be very active on this site, but I notice he hasn?t been around since October last. Have you tried the discussions at codeplex?


Paul Weston
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:













changepassword not working when application moved

windows authentication - signing in as a different user

asp.net 2.0 trust level and binary serialization

check for valid user name in login form

iframe pass current logged in user

windows authentication problem

userisonlinetimewindow vs session.timeout

weird issue with windows authentication in asp.net 2.0

directoryentry access denied

security advice

authentication & authorization issue for server site

problem creating a custom membershipprovider

writing file permission

error creating a folder within site

how to declare a useraccount non-active after registration.

what's the difference between user.identity.name and request.servervariables["logon_user"] ?

create folder on remote server

manage users - how can i get all users with their profile datas?

storing additional user information - best practices

problem with page.user.identity.name

could not use ''; file already in use aspx

how to secure non-aspx pages in the same application

membership user and pass works locally but not remotely

thoughts on linking membership database to another database

integrated authentication

forms auth & local group membership

multiple ssl sites setup?

how can i get applicationid for my cuurent web app?

forms authentication question

how to always navigate the user to the default page after login?

why do we have to modify default ie cookie settings here?

org chart - membershipuser.isonline

my company has locked down my desktop and now i cannot build asp.net apps

form authentication problem

use asp:login

how to writing a custom membership mssqlprovider(c#)

users having to login repeatedly in one session

roles per person and per page

session and userid guid advice needed?

login form ?

writing your own custom membership providor

controlling aceess to specific locations

how to secure static documents in wwwroot

redirecting users after they've been denied an access

asp.net 2.0 login control - user creation problem

help with login control..pls!

change password and security question at the same time.

admin login options

how do you display roles using web matrix and vb?

how to call the overriden event handler of createuser wizard

   
  Privacy | Contact Us
All Times Are GMT