question about event sequence for Page_Load and Menu1_MenuItemClic

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
 
B

Ben Dewey

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.
 
G

Guest

Never mind.
I finally understand the event model now - just do page build requirements
in the menuClick event - works great.
Thanks anyway
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top