I don't understand this

J

Jeff

hey

asp.net 2.0

if I add the code below as the code executed when a button is clicked, then
a menu item is added to the menu. But if I add the same code to the
Page_Load event of a webpage, the menu item isn't added

Here is the code:
MenuItem menuItem = new MenuItem("Menu item text", "menuitemvalue",
"imageurl", "navigateurl");
Menu1.Items.Add(menuItem);

Any ideas why this don't work in the Page_load event?

jeff
 
G

Guest

Sorry to thread hijack but what i am having trouble with is at what point in
that process are databound controls populated with the values from the data
source?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top