asp.net向导控制不可点击的侧边栏(asp.net wizard control non

编程入门 行业动态 更新时间:2024-10-27 22:28:58
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>

更多推荐

本文发布于:2023-08-07 13:16:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464178.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:侧边   向导   net   asp   wizard

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!