ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2017 www.aspforums.com. All rights reserved.Show/Hide Start Bootstrap (SB) Admin 2 Menu based on user Role in ASP.Net<p>This is the code they have provided for the menu,in index.html page. I have used it in the master page.</p> <pre class="brush: html">&lt;body&gt; &lt;div id=&#34;wrapper&#34;&gt; &lt;nav class=&#34;navbar navbar-default navbar-static-top&#34; role=&#34;navigation&#34; style=&#34;margin-bottom: 0&#34;&gt; &lt;ul class=&#34;nav navbar-top-links navbar-right&#34;&gt; &lt;/ul&gt; &lt;div class=&#34;navbar-default sidebar&#34; role=&#34;navigation&#34;&gt; &lt;div class=&#34;sidebar-nav navbar-collapse&#34;&gt; &lt;ul class=&#34;nav&#34; id=&#34;side-menu&#34;&gt; &lt;/ul&gt; &lt;/div&gt; &lt;!-- /.sidebar-collapse --&gt; &lt;/div&gt; &lt;!-- /.navbar-static-side --&gt; &lt;/nav&gt; &lt;!-- /#page-wrapper --&gt; &lt;/div&gt; &lt;/body&gt;</pre> <p>The solution is like below. Just include the</p> <pre class="brush: html">&lt;ul class=&#34;nav&#34; id=&#34;side-menu&#34;&gt;&lt;/ul&gt;</pre> <p>inside a div. You can add several div s like this and control the visibility in server side according to roles.</p> <pre class="brush: html">&lt;body&gt; &lt;div id=&#34;wrapper&#34;&gt; &lt;nav class=&#34;navbar navbar-default navbar-static-top&#34; role=&#34;navigation&#34; style=&#34;margin-bottom: 0&#34;&gt; &lt;ul class=&#34;nav navbar-top-links navbar-right&#34;&gt; &lt;/ul&gt; &lt;div class=&#34;navbar-default sidebar&#34; role=&#34;navigation&#34;&gt; &lt;div class=&#34;sidebar-nav navbar-collapse&#34;&gt; &lt;div runat=&#34;server&#34; visible=&#34;false&#34; id=&#34;divA&#34; &gt; &lt;ul class=&#34;nav&#34; id=&#34;side-menu&#34;&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div runat=&#34;server&#34; visible=&#34;false&#34; id=&#34;divB&#34; &gt; &lt;ul class=&#34;nav&#34; id=&#34;side-menu&#34;&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- /.sidebar-collapse --&gt; &lt;/div&gt; &lt;!-- /.navbar-static-side --&gt; &lt;/nav&gt; &lt;!-- /#page-wrapper --&gt; &lt;/div&gt; &lt;/body&gt;</pre> <p>&nbsp;</p>http://www.aspforums.net/Threads/139301/ShowHide-Start-Bootstrap-SB-Admin-2-Menu-based-on-user-Role-in-ASPNet/http://www.aspforums.net/Threads/139301/ShowHide-Start-Bootstrap-SB-Admin-2-Menu-based-on-user-Role-in-ASPNet/Mon, 09 Jan 2017 03:16:50 GMT