asp.net向导控制不可点击的侧边栏(asp.net wizard control non-clickable sidebar)
我有一个asp.net向导,我希望用户只使用下一个/上一个按钮导航控件。
无论如何,我想设置侧边栏,以便显示步骤名称,突出显示当前步骤,但不要让用户点击它们。
这可能吗?
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?
最满意答案
您可以使用SideBarTemplate并将链接的Enabled属性设置为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>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>更多推荐
发布评论