That method never gets hit. That line never gets executed. I still can't figure out how to get this to work.
You say I can store this in the Page_Load method, but the user doesn't select anything until after the page has already loaded, right? Then they could make multiple selections, showing one panel, then another, then another before they finally click on one
of my menu items. I don't get how setting this in page load takes care of it. Don't I actually need a specific event to get the value, with that event being whichever menu item they click, so I know which pane it's in, so I know to save that value?
What am I missing here? Again, thanks for helping me work through this.
Bubba627
Member
1 Points
17 Posts
Re: Maintaining Accordion panel selected state across postbacks
Sep 30, 2007 03:09 PM|LINK
Sorry, but this one seems to be avoiding me. Please bear with me here.
I set up a link button in one of the panels on my master page. It's coded as this:
<asp:LinkButton ID="lbContact" runat="server" OnClick="Foo" PostBackUrl="~/help/contactus.aspx">LinkButton</asp:LinkButton>
I set a breakpoint in my Foo method, and all that does is this:
ViewState["SelectedPanel"] = Accordion1.SelectedIndex;
That method never gets hit. That line never gets executed. I still can't figure out how to get this to work.
You say I can store this in the Page_Load method, but the user doesn't select anything until after the page has already loaded, right? Then they could make multiple selections, showing one panel, then another, then another before they finally click on one of my menu items. I don't get how setting this in page load takes care of it. Don't I actually need a specific event to get the value, with that event being whichever menu item they click, so I know which pane it's in, so I know to save that value?
What am I missing here? Again, thanks for helping me work through this.