I don't understand this

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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?
 
Back
Top