4

I have an asp.net wizard, and I want the user to navigate the control only with the next/previous buttons.

Anyway, I would like to set the sidebar so that it displays the step names with the current step highlighted, but without letting the user click on them.

Is this possible?

Paolo Tedesco
  • 55,237
  • 33
  • 144
  • 193

1 Answers1

7

You can use a SideBarTemplate and set the Enabled attribute of the links to False:

<asp:Wizard runat="server" DisplaySideBar="true">
    <SideBarTemplate>
        <asp:DataList ID="SideBarList" runat="server">
            <ItemTemplate>
                <asp:LinkButton ID="SideBarButton" runat="server" Enabled="false" />
            </ItemTemplate>
            <SelectedItemTemplate>
                <asp:LinkButton ID="SideBarButton" runat="server" Enabled="false" CssClass="currentStep" />
            </SelectedItemTemplate>
        </asp:DataList>
    </SideBarTemplate>
    ...
</asp:Wizard>
tspauld
  • 3,512
  • 2
  • 25
  • 22