Click here to Skip to main content
14,699,224 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

opeining html tag
opeining body tag
opeining form tag
    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>
            <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 class="form-group">
                                    <div class="col-sm-10">
                                        <asp:TextBox class="form-control" ID="txtpassword" runat="server" placeholder="Password"></asp:TextBox>
                                <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>
                         <%--   </form>--%>
                           <!-- Ending of form -->
                    <!-- End of dropdown menu login menu control -->

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

    <footer class="navbar navbar-default navbar-fixed-bottom ">
        <div class="container">
            <p class="navbar-text pull-left">&copy; Tarun Jaiswal</p>
            <a href="" target="_blank" class="navbar-btn btn btn-success pull-right">follow me</a>

    <!-- <script src="//"></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
Updated 31-Jul-19 6:33am

It's works!! Thanks for the answer!!
Add on master page

below script

   <script type="text/javascript">        $(function () {
            // Setup drop down menu

            // Fix input element click problem
            $('.dropdown input, .dropdown label').click(function (e) {

it will work

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900