473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Tricky one regarding SiteMapProvider/Menu

Hi people,

I'm trying to build a menu i asp.net 2.0 (RC) using the Menu control and an
XmlSiteMapProvider.
I want all letters of my menuitems to be capitalized, but i want the first
letter in every menuitem to be in a larger font.

Any ideas, clues, pointers?

J. Jespersen
Denmark

ps. Example illustration what i want: http://www.netkoder.dk/menuitem.jpg

Nov 19 '05 #1
2 1366
You'll want to use a menu template. Like template columns in a
DataGrid you can use data binding expressions to format the apperance
and content of the node. A simple template would look like:

<StaticItemTemplate>
<%# Eval("Text") %>
</StaticItemTemplate>

You could throw in some <span> and Substring calls to get what you
need.

HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 26 Sep 2005 19:07:04 +0200, "J. Jespersen"
<jd*@jdjfjerndette.dk> wrote:
Hi people,

I'm trying to build a menu i asp.net 2.0 (RC) using the Menu control and an
XmlSiteMapProvider.
I want all letters of my menuitems to be capitalized, but i want the first
letter in every menuitem to be in a larger font.

Any ideas, clues, pointers?

J. Jespersen
Denmark

ps. Example illustration what i want: http://www.netkoder.dk/menuitem.jpg


Nov 19 '05 #2
Hi Scott, (and everyone else)

Thanks for your reply. Got it solved.

In my .aspx

<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1">
<StaticItemTemplate>
<%# formatMenuItem(Eval("Text"))%>
</StaticItemTemplate>
</asp:Menu>

In my .aspx.vb
Public Function formatMenuItem(ByVal itemText As String) As String
Return UCase("<span style=""font:14px Verdana"">" & Left(itemText, 1) & "</span><span style=""font:9px Verdana"">" & Right(itemText, (Len(itemText) - 1)) & "</span>")
End Function

Again, thanks.

J.Jespersen
Denmark


"Scott Allen" <sc***@nospam.odetocode.com> skrev i en meddelelse news:1m********************************@4ax.com...
You'll want to use a menu template. Like template columns in a
DataGrid you can use data binding expressions to format the apperance
and content of the node. A simple template would look like:

<StaticItemTemplate>
<%# Eval("Text") %>
</StaticItemTemplate>

You could throw in some <span> and Substring calls to get what you
need.

HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 26 Sep 2005 19:07:04 +0200, "J. Jespersen"
<jd*@jdjfjerndette.dk> wrote:
Hi people,

I'm trying to build a menu i asp.net 2.0 (RC) using the Menu control and an
XmlSiteMapProvider.
I want all letters of my menuitems to be capitalized, but i want the first
letter in every menuitem to be in a larger font.

Any ideas, clues, pointers?

J. Jespersen
Denmark

ps. Example illustration what i want: http://www.netkoder.dk/menuitem.jpg

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: RCS | last post by:
All, OK, so I'm working on a template for our new ASP.NET applications. Part of this, includes using the new menu and breadcrumbs control in ASP.NET 2.0 (I'm using beta 2). I put the...
1
by: RCS | last post by:
Does anyone know of a tabbed navigation control that supports SiteMapProvider (the same way the menu, breadcrumbs and treeview do in 2.0)?? I'm looking for www.amazon.com style tabbed...
2
by: dhurwitz | last post by:
Hi, I have written a custom SiteMapProvider to retrieve site map data from a SQL Server database table. It works fine when used as the data source for a Menu control, so I am confident that all...
3
by: Adrian Sharp | last post by:
I've got a pretty basic sitemap setup, but am getting a runtime error: "The SiteMapProvider 'MySiteMap' cannot be found." This occurs only when I access my website under IIS 5.1. When I run my...
1
by: shapper | last post by:
Hello, How to make a SiteMapDataSource to use a SiteMapProvider defined in Web.Config? I think I should use something like: MySiteMapDataSource.Provider = ... However I don't know what to...
0
by: shapper | last post by:
Hello, I need to create a custom SiteMapProvider. I searched in Google for examples but I am still completly lost. The custom SiteMapProvider I need to create is exactly the same as the...
0
by: Alex Brown | last post by:
Is it a problem to attach Non-static site map providers under one that inherits from StaticSiteMapProvider ? We are implementing a custom site map provider for a website that is being converted...
2
by: Steve Harclerode | last post by:
Hi, I have implemented a working SiteMapProvider as shown on an msdn page: http://msdn.microsoft.com/en-us/library/ms178434(VS.80).aspx My question is: Can I make the TreeView that uses a...
1
by: =?Utf-8?B?QnJvb2s=?= | last post by:
Hey everyone, My scenario is as follows: In my website the users session id is constantly passed from page to page on the URL. I have one main menu that appears the same on each page, one of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.