I'm trying to make the SideBar function more like Prev/Next buttons. The navigation buttons only check for validation when moving forward; they don't care if you go back. As far as I can tell, you can only have one or the other option on the SideBar, not both. So, here's what I was attempting to do:
<SideBarTemplate>
<asp:DataList ID="SideBarList" runat="server">
<ItemTemplate>
<asp:LinkButton ID="SideBarButton" runat="server" CausesValidation="<%# Container.ItemIndex >= myWizard.ActiveStepIndex %>" />
</ItemTemplate>
</asp:DataList>
</SideBarTemplate>
It works going forward, but fails on previous steps with this error:
Page.IsValid cannot be called before validation has taken place. It should be queried in the event handler for a control that has CausesValidation=True and initiated the postback, or after a call to Page.Validate.
Any suggestions?
edit: I did take a look at this post, but it doesn't appear to solve the problem.