I'd appreciate your help with the follwoing.
I've dragged a menu control (mnuTemplate) onto my page, and I'm trying to dynamically add menu items to the control. Adding the menu items seems to work fine, however, the ItemClick event handler isn't firing when I click on the dynamically added items. Please see sample code code Ibelow.
Code: C#
protected void Page_Load(object sender, EventArgs e)
{
EO.Web.MenuItem oInitMenuItem = new EO.Web.MenuItem("Test");
mnuTemplate.Items.Add(oInitMenuItem);
mnuTemplate.ItemClick += new EO.Web.NavigationItemEventHandler(mnuTemplate_ItemClick);
oInitMenuItem.RaisesServerEvent = EO.Web.NullableBool.True;
oInitMenuItem.NavigateUrl = "CfgMenuStruct.aspx";
}
protected void mnuTemplate_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
EO.Web.MenuItem oItem = (EO.Web.MenuItem) e.NavigationItem;
txtLabel.Text = oItem.Text.ToString();
}
Please respond to
massis@sagestream.com ASAP if you have any comments/suggestions.
Thanks,
Massis