Tricky one regarding Menu control and SiteMap

J

J. Jespersen

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
 
J

J. Jespersen

After some fiddling i got this to work, albeit not as elegant as I would
like:

<siteMapNode url="default.aspx" title="&lt;span style='font: 12px
Verdana;'>M&lt;/span&gt;&lt;span style='font: 9px Verdana;'&gt;ENU
ITEM&lt;/span&gt;" description="Go to main page">

But thanks. You got me in the right direction. So far... ;-)

J.Jespersen
Denmark
 
J

J. Jespersen

Hi again,

Got it solved in a different way. But thanks for input anyways. Absolutely.


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

....this way, I won't need to make a mess of my .Sitemap file. ;-)

Again, thanks.

J.Jespersen
Denmark
 
C

clintonG

Yea I read your other post. Much more elegant and thanks for being
considerate and posting what you worked out.

<%= Clinton Gallagher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top