I have a WebExplorerBar in a MasterPage used for navigation. Upon navigating to a new page the WebExplorerBar does not postback with the previous item appearing as selected. How do I get the WebExplorerBar to maintain it's state after postback?
Hello,
This can be accomplished by putting the Navigate URL in the value field instead the NavigateUrl field and setting the auto post back for the clicked event to true. By doing this you can code the Item Click event to save the state of the WebExplorerBar to session then use the value field to navigate to the new page. To put the WebExplorer back to the prior state you can retrieve the saved session information in the pre-render event and programatically set the state of the control.
Thanks,
Valerie
Are there examples for this. When I do what you suggest the WebExplorerBar always has group 0 expanded. I even tried using a client side event to set it up the $find() method is not working an always returns null
Please see the attached sample.
Did the sample help resolve your issue?
Please let me know if you have any other questions.
I did not get notification when you posted the sample but I did with your last post. I have seen this sample before, I had a ticket open as well and this sample looks very familiar :)
It got me in the right ball park. I can use Sessions as that does not work in a load balanced environment. Also we had the GroupExpandBehaviour set to SingleExpanded and your example will not work when that attribute is set.
We fixed this by turning off all auto postback events of the control and using the Inserting and Inserted client side events. If we need a post back, we call __doPostBack and pass the control as well as the item pressed. We did it this way since there is no way yo turn off the group expanding event from posting back to the server.
Once at the server, we store the state in either a cookie or a memcache server to tell us what the state of the menu was.
I'm glad to hear you were able to resolve your issue. Please let me know if you have any other questions on this matter.