Как скрыть подменю в asp.net
Всем привет,
У меня есть меню как в переднем конце, так и ниже:
<asp:Menu ID="Menu1" Width="100%" Orientation="Horizontal" runat="server" BackColor="#F7F6F3" DynamicHorizontalOffset="2" Font-Bold="True" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#7C6F57" StaticSubMenuIndent="10px"> <StaticSelectedStyle BackColor="#5D7B9D" /> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#7C6F57" ForeColor="White" /> <DynamicMenuStyle BackColor="#F7F6F3" /> <DynamicSelectedStyle BackColor="#5D7B9D" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <StaticHoverStyle BackColor="#7C6F57" ForeColor="White" /> <Items> <asp:MenuItem NavigateUrl="~/TeamLeader/Home.aspx" Text="Home" Value="Home"> </asp:MenuItem> <asp:MenuItem Text="Attendance Report" Value="Reports"> <asp:MenuItem NavigateUrl="~/TeamLeader/NewAttendanceReport.aspx" Text="Attendance Report" Value="Attendance Report"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/LateComer.aspx" Text="Late Coming Report" Value="Late Comer Report"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/DailMovementLog.aspx" Text="Daily Movement Log Report" Value="Daily Movement Log Report"> </asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/MeetingReport.aspx" Text="Official Meeting Report" Value="Officia lMeeting"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/LunchReport.aspx" Text="Lunch Report" Value="Lunch Report"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="Leave Reports" Value="Leave Reports"> <asp:MenuItem NavigateUrl="~/TeamLeader/LeaveReport.aspx" Text="Leave Report" Value="Leave Report"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/AllotedLeave.aspx" Text="Allotted Leave Report" Value="Allotted Leave Report"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/ApprovalReport.aspx" Text="Approved/Disapproved Leave Report" Value="Approved/Disapproved Leave Report"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="Employee Report" Value="Employee Report"> <asp:MenuItem NavigateUrl="~/TeamLeader/LeaveReportofEmployee.aspx" Text="Employee Leave Report" Value="Employee Leave Report"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/AvailableLeaveReport.aspx" Text="Available Leave Report" Value="Available Leave Report"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/ChangePassword.aspx" Text="Change Password" Value="Change Passowrd"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/TeamLeader/Logoutt.aspx" Text="Logout" Value="Logout"> </asp:MenuItem>
Теперь я хочу скрыть некоторые подменю из кода позади .
Пожалуйста, дайте мне знать, как решить эту проблему.