且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在ASP.NET MVC3中使用Jquery的侧面菜单

更新时间:2021-10-29 08:12:56

使用.Ascx文件(webusercontrol)创建左侧"菜单,而在内部Ascx.cs文件中编写数据库操作

Use .Ascx files(webusercontrol) to create the Left menu and Inside Ascx.cs file write the data base actions

<asp:Menu ID="Menu1" DataSourceID="xmlDataSource" runat="server"

            DynamicHorizontalOffset="2" StaticSubMenuIndent="10px" Width="145px"

        OnMenuItemClick="Menu1_MenuItemClick" >

          <DataBindings>
            <asp:MenuItemBinding DataMember="MenuItem"

             TextField="Text" ToolTipField="ToolTip" />
       
       </asp:Menu>




您必须使用xmlDataSource(.xsl文件)列出菜单




You have to use xmlDataSource (.xsl file) to list menus