Welcome Guest Search | Active Topics | Sign In | Register

Menu not showing - newbie question Options
Laurent
Posted: Tuesday, September 11, 2007 3:12:29 PM
Rank: Newbie
Groups: Member

Joined: 9/11/2007
Posts: 8
Hi all,

I'm sorry for this newbie question.

I've just downloaded the trial version and I'm trying to programatically add a menu to a page but this menu is not showing.

Here is my code :


public class MenuControl : System.Web.UI.WebControls.WebControl, INamingContainer
{
protected override void OnInit(EventArgs e)
{
EO.Web.Menu menu = new EO.Web.Menu();
EO.Web.MenuItem studio = new EO.Web.MenuItem();
studio.Text.Html = "Studio";
menu.Items.Add(studio);
Controls.Add(menu);
}
}

If I replace the Eo.Web stuff with the line below, it perfectly adds the literal control to the page

Controls.Add(new LiteralControl("OK"));


What am I missing ?
Thanks in advance,
Laurent.
eo_support
Posted: Tuesday, September 11, 2007 3:20:55 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Laurent,

We tried the same code and it did work here. What we did is to have an blank page, then put in a Panel, then create a MenuControl in Page_Load:

Code: C#
private void Page_Load(object sender, System.EventArgs e)
{
    Panel1.Controls.Add(new MenuControl());
}


Can you try the same and see if it works for you? Also you might want to try to use a static menu and make sure it works first.

Thanks
Laurent
Posted: Wednesday, September 12, 2007 1:57:56 AM
Rank: Newbie
Groups: Member

Joined: 9/11/2007
Posts: 8
Hi,

I tried what you suggested but it's not working either.

Anyway the live demos are working fine on localhost so it must be something stupid I'm not setting up correctly for my own project.

I'll be trying to troubleshoot it because I really want to test your great product !

Thanks,
Laurent.
Laurent
Posted: Wednesday, September 12, 2007 2:53:26 AM
Rank: Newbie
Groups: Member

Joined: 9/11/2007
Posts: 8

I could have it work and it's really great.
Thanks,
Laurent.


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.