question about event sequence for Page_Load and Menu1_MenuItemClic

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Page_Load I try to use the this.Menu1.SelectedValue on postBack
situations for the purpose of building the page. But it appears that the
selected value does not show up until the Menu1_MenuItemClick event. Since
Page_Load is fireing before Menu1_MenuItemClick, my strategy is useless.
How can I utilize the selected menu item in Page_Load? Or, might it be that
using Page_Load for the build logic is not appropriate?
Thanks
 
Make sure that you don't rebind the menu on the Page_Load event. use:
If Not Page.IsPostBack Then
Menu.DataSource = ...
...
End If

If you could supply code on the next post it would help.
 
Never mind.
I finally understand the event model now - just do page build requirements
in the menuClick event - works great.
Thanks anyway
 
Back
Top