We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problems with the Menu Control

Thread ID:

Created:

Updated:

Platform:

Replies:

63072 Jun 27,2007 06:33 PM UTC Oct 17,2007 01:40 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: Tools
Martin Phee
Asked On June 27, 2007 06:33 PM UTC

I'm adding menu items dynamically in the Page_Load event of a user control.

string url = String.Format("~/Nymex/Details.aspx?nhid={0}", ext.NhId);
MenuItem menuItem = new MenuItem();
menuItem.Text = ext.NhSessiondate.ToString("MMM dd, yyyy (ddd)");
menuItem.NavigateUrl = url;
menuItem.ID = ext.NhId.ToString();
item.Items.Add(menuItem);

When I click on the menu item it just does a postback to whatever page it's on and doesn't go to the NaviageUrl. This worked using the asp:menu control.

All of my other menu items that are defined in the ascx page work fine. I'm only having problems with the ones I add dynamically.

Martin Phee
Replied On June 27, 2007 07:10 PM UTC

I moved the code to populate the menu items to Page_Init and now it seems to work. This is different than how the asp:menu control works and a little unexpected.

Shouldn't it work in the Page_Load?

Ramya R [Syncfusion]
Replied On June 28, 2007 07:10 AM UTC

Hi Marty,

Thank you for your interest in Syncfusion Products.

I was not able to reproduce the issue that you have mentioned here.

Could you please take a look at the attached sample and modify it to reproduce the issue that you have mentioned here and send it back to us, so that it would help us in analyzing this issue?

You can download the sample from the below provided webpage link,
http://websamples.syncfusion.com/samples/Tools.Web/5.1.0.51/F63072/main.htm

Please let me know if you have any queries.

Thanks & Regards,
Ramya.

Dharmesh Desai
Replied On October 17, 2007 01:40 PM UTC

Hi Ramya,

I have experienced a similar problem with the menu control. In my case I had the menu.NavigateUrl = "page.aspx" and it would not work, so I fixed this by using the Target property, which then fixed the issue.

Is there a bug in the control?

Thanks,
Dharmesh Desai
>Hi Marty,

Thank you for your interest in Syncfusion Products.

I was not able to reproduce the issue that you have mentioned here.

Could you please take a look at the attached sample and modify it to reproduce the issue that you have mentioned here and send it back to us, so that it would help us in analyzing this issue?

You can download the sample from the below provided webpage link,
http://websamples.syncfusion.com/samples/Tools.Web/5.1.0.51/F63072/main.htm

Please let me know if you have any queries.

Thanks & Regards,
Ramya.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;