CSS Friendly Control Adapters & MWPSK

Topics: Developer Forum
Jan 24, 2008 at 7:15 PM
Hi.
I wondered if there were someone who have tried to implement CSS Friendly Control Adapters with MWPSK with positive results?
Jan 25, 2008 at 5:28 PM
It's not easy for Login control you have to play with the css styles.
Menu too can be maked up. But if you plan to make something different from the standard you could have trouble.
Jan 29, 2008 at 5:10 PM
It's really easy. I use it in allmost all sites I make. With a little skill you can customize the menu as you wish.
I just dropped two files for the menu in "Adapters" folder
Utility.cs and MenuAdapter.cs

in App_Browser "browser" I configured it like:

<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu"
adapterType="CSSFriendly.MenuAdapter" />
</controlAdapters>
</browser>

<browser id="W3C_Validator" parentID="default">
<identification>
<userAgent match="^W3C_Validator" />
</identification>
<capabilities>
<capability name="browser" value="W3C Validator" />
<capability name="ecmaScriptVersion" value="1.2" />
<capability name="javascript" value="true" />
<capability name="supportsCss" value="true" />
<capability name="supportsCallback" value="true" />
<capability name="tables" value="true" />
<capability name="tagWriter" value="System.Web.UI.HtmlTextWriter" />
<capability name="w3cdomversion" value="1.0" />
</capabilities>
</browser>
</browsers>

Now you can see your menu as a regular UL LI menu. You can do the same for TreeView.
You can view the source at this page http://www.lackman.se/ and se the nice idented ul li menu.

Good luck

Feb 6, 2008 at 10:09 AM
Hello Rickard, I saw your solution and you made a great job. Compliment for this.
Unfortunantly I do not understand completely how you reached this result. Could you please clarify :

1) is App_Browser a new folder you created in the project?
2) witch is the contect of files Ulitity.cs and MenuAdapters.cs?
3) Where should I paste the code you wrote?

Thanks you in advance for your explanation.


Feb 6, 2008 at 7:40 PM


accordeon wrote:
Hello Rickard, I saw your solution and you made a great job. Compliment for this.
Unfortunantly I do not understand completely how you reached this result. Could you please clarify :

1) is App_Browser a new folder you created in the project?
2) witch is the contect of files Ulitity.cs and MenuAdapters.cs?
3) Where should I paste the code you wrote?

Thanks you in advance for your explanation.



Hello again

1. The AppBrowsers folder is a standard ASP.NET folder , rightclick solution and add ASPNET folder "AppBrowsers"
2. Download CssFriendly adapters from eg. codeplex
2. The code provided "CSSFriendlyAdapters.browser" comes with CssFriendlyadapters. Iv'e just changed it for my needs.
Feb 16, 2008 at 4:25 PM
Edited Feb 16, 2008 at 4:25 PM

I've downloaded and unzipped the files for the CssFriendlyAdapter from here:
http://www.codeplex.com/cssfriendly/Release/ProjectReleases.aspx?ReleaseId=2159

But I don't see any Utility file...

So where can I found the Utility.cs? Or if anyone has it's content, please simply paste it in here...