Home Search Member List Faq Register Login  
UltimateMenu
Problem adding menu Programmatically

Thread Starter: tander   Started: 11-30-2006 12:57 AM   Replies: 1
 Karamasoft Support Forums » General Discussions » UltimateMenu » Problem adding menu Programmatically
 Printable Version    « Previous Thread   Next Thread »
  30 Nov 2006, 12:57 AM
tander is not online. Last active: 12/22/2006 2:30:04 AM tander

Top 10 Posts
Joined on 09-20-2005
Posts 9
Problem adding menu Programmatically
Hi

I'm trying to add the menu from codebehind. I can get the menu up and running in IE 6 but in FireFox the menu is not working. The problem is that the sub menu is not showning. If I don't add the menu from codebehind I have no problem getting the menu to work.

Code to add menu to page:

Dim menu As New Karamasoft.WebControls.UltimateMenu

menu.MenuSource = "Microsoft1.xml"

Me.Page.Controls.Add(menu)

My XML is the Original XML from the Microsoft example, I have just removed som part of it.

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

<Menu xmlns="http://schemas.karamasoft.com/WebControls/UltimateMenu" ScriptPath="/Karamasoft/UltimateMenu/v3.1/Demos/VB/Scripts"

ImagePath="/Karamasoft/UltimateMenu/v3.1/Demos/VB/Samples/Images" CssFile="Microsoft.css"

Layout="Vertical" UseArrowForNoOnClick="False" ScrollTimeout="5" ScrollIncrement="5"

MenuCssClass="MicrosoftMenu" DefaultGroupCssClass="MicrosoftGroup" MenuItemCssClass="MicrosoftItem"

MenuItemOverCssClass="MicrosoftItemOver" DefaultItemCssClass="MicrosoftItem" DefaultItemOverCssClass="MicrosoftItemOver"

DefaultScrollArrowCssClass="MicrosoftItem" DefaultScrollArrowOverCssClass="MicrosoftItemOver"

DefaultDisabledScrollArrowCssClass="MicrosoftDisabledScroll" DefaultDisabledItemCssClass="MicrosoftDisabledItem"

MenuItemClickCssClass="MicrosoftItemClick" MenuItemWidth="160" DefaultItemWidth="180"

DefaultItemHeight="18" MenuItemHeight="18">

<Group xmlns="">

<Item ID="Item1" Caption="Products &amp; Technologies">

<Group OffsetX="-4" Scrolling="True" AutoScrollHeight="True" Filter="Shadow" Filter_Shadow_Strength="3"

DefaultItemWidth="250">

<Item ID="Item2" Caption="Access" />

</Group>

</Item>

</Group>

</Menu>



 


  
  30 Nov 2006, 12:42 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Problem adding menu Programmatically
You need to set the ID property of your menu as follows:

Dim menu As New Karamasoft.WebControls.UltimateMenu
menu.ID = "MyMenuID"
menu.MenuSource = "Microsoft1.xml"
Me
.Page.Controls.Add(menu)


  
 Page 1 of 1 (2 items)
Karamasoft Support Forums » General Discussions » UltimateMenu » Problem adding menu Programmatically

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2021 Karamasoft LLC. All rights reserved.