Tarun Jaiswal Ответов: 2

Bootstrap Навигационная Панель При Нажатии На Выпадающую Кнопку Входа В Систему Она Показывает Меню Входа В Систему Но Как Только Я Нажимаю На Текстовое Поле Меню Входа Для Ввода Имени Пользователя Оно Исчезает


in ASP.NET master-page m usign bootstrap navigation bar. navigation bar have some links and dropdown named login menu, when i click on in dropdown login menu it works fine but as soon user click inside dropdwon login menu to to enter his username and passsword dropdown menu  gets toogle.
what i can do to solve this problem ?

here is my usermaster.master page source code

<code>
opeining html tag
opeining body tag
opeining form tag
    body
    form class="form-horizontal" role="form" id="Form1" runat="server"

    <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
        <div class="container">
         <a href="#" class="navbar-brand">Tarun Company</a>
            <button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <div class="collapse navbar-collapse navHeaderCollapse">
                <ul class="nav navbar-nav navbar-right">
                   <!--Start of dropdown menu login menu control -->

                    <li class="dropdown" id="menuLogin1">
                        <a class="dropdown-toggle" href="#" data-toggle="dropdown" id="navLogin1">Login Menu</a>
                        <div class="dropdown-menu" style="padding: 10px;">
                            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                            <!-- starting of form -->
                            <%--<form class="form-horizontal" role="form" id="loginform" runat="server">--%>
                                <div class="form-group">
                                    <div class="col-sm-10">
                                        <asp:TextBox class="form-control" ID="txtemailid" runat="server" placeholder="Email ID"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-10">
                                        <asp:TextBox class="form-control" ID="txtpassword" runat="server" placeholder="Password"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-10">
                                        <asp:Button class="btn btn-primary btn-block pull-right" ID="btnSubmit" runat="server" Text="Sign in" />
                                        <br />
                                        <br />
                                        <a href="#" class="col-ms-4 pull-right">forget password ?</a>
                                    </div>
                                </div>
                         <%--   </form>--%>
                           <!-- Ending of form -->
                                </asp:ContentPlaceHolder>
                        </div>
                    </li>
                    <!-- End of dropdown menu login menu control -->
                </ul>
            </div>
        </div>
    </nav>


    <section>
        <div class="container">
           <asp:ContentPlaceHolder ID="mainsection" runat="server">

            </asp:ContentPlaceHolder>
            </div>
    </section>
</form>
    <footer class="navbar navbar-default navbar-fixed-bottom ">
        <div class="container">
            <p class="navbar-text pull-left">&copy; Tarun Jaiswal</p>
            <a href="https://www.twitter.com/TarunJaiswa" target="_blank" class="navbar-btn btn btn-success pull-right">follow me</a>
        </div>
    </footer>

    <!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>"></script> -->
    <script type="text/javascript" src="Scripts/jquery-2.1.0.min.js"></script>
    <script type="text/javascript" src="Scripts/bootstrap.min.js"></script>





after this is have closing form, body,html

2 Ответов

Рейтинг:
2

Member 11031334

Это работает!! Спасибо за ответ!!


Рейтинг:
0

Vaishali-Member 3830703

Add on master page

below script

   <script type="text/javascript">        $(function () {
            // Setup drop down menu
            $('.dropdown-toggle').dropdown();

            // Fix input element click problem
            $('.dropdown input, .dropdown label').click(function (e) {
                e.stopPropagation();
            });
        })</script>



it will work