Welcome Guest Search | Active Topics | Sign In | Register

EO.Web.Menu.LoadMenu Options
Chris
Posted: Thursday, June 14, 2007 11:47:54 AM
Rank: Newbie
Groups: Member

Joined: 6/14/2007
Posts: 1
I have a license for version 2007.1

I want to be able to dynamically load a menu control using the .ascx file created by the Menu Builder.

Howerver, using the LoadMenu() method of the Menu class doesn't seem to write the new menu out to the client.

Simple Code

protected void Page_Load(object sender, EventArgs e)
{
mnuMain = EO.Web.Menu.LoadMenu("~/dd.eo.menu.ascx");
}

No errors, inspecting the code show that the mnuMain object contains 9 items (which I expect) but the changes are never written out to the client.

What am I doing wrong?

TIA for the help,

C
eo_support
Posted: Thursday, June 14, 2007 11:55:14 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
No. That will never work. LoadMenu only load it into the memory and you still need to decide what to do with it --- mainly where to put it, such as:

Code: C#
Panel1.Controls.Add(mnuMain);


Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.