troubleshooting Question

Bootstrap - hide <li> based on a conditionb

Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America asked on
ASP.NETVisual Basic.NETHTMLBootstrap
2 Comments1 Solution240 ViewsLast Modified:
Using Bootstrap, is there a way I can hide "Switch User" from my dropdown based on a certain condition from my code behind?

  <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li><a runat="server" href="~/">Home</a></li>
                        <li><a runat="server" href="~/About">About</a></li>
                        <li><a runat="server" href="~/Contact">Contact</a></li>
                        <li class="dropdown">
                            <a href="/" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> John Doe<strong class="caret"></strong></a>
                            <ul class="dropdown-menu">
                                    <a href="#">Switch User</a>
                                    <a href="#">Account</a>
                                    <a href="#">Billing</a>
                                <li class="divider"></li>
                                    <a href="#"><span class="glyphicon glyphicon-off">LogOut</span></a>

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros