2
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage2.master.cs" Inherits="MasterPage2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta charset="utf-8" /> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>

     <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Custom CSS for the 'Heroic Features' Template -->
    <link href="css/heroic-features.css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">


     </script>

    <title>Online Teacher Appraisal System</title>
     <link rel="Stylesheet" type="text/css" href="css/jquery.datepick.css"/>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
    <script src="Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery.datepick.js"></script>
    <script type="text/javascript" src="Scripts/bootstrap.js"></script>
    <script type="text/javascript" src="Scripts/bootstrap.min.js"></script>


    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
     <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
            </div>

          <a><div class="navbar-brand"style="color:#ff006e">Name yet to be decided</div></a>
             <div class="navbar-right" style="color:#00ff21">
                <%--<asp:Label CssClass="pull-right" ID="Label_login" runat="server" ></asp:Label></div>--%> 
                <ul class="nav navbar-nav pull-right" >
                       <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <asp:Label CssClass="pull-right" ID="Label_login" runat="server" ></asp:Label></a>
                           <ul class="dropdown-menu">
                               <li><a href="#">Change Password</a></li>
                               <li><a href="#">Logout</a></li>        
                          </ul>
                       </li>
                </ul>

            </div>



        <!-- Collect the nav links, forms, and other content for toggling -->
        <%--<div class="collapse navbar-collapse navbar-ex1-collapse">
          <ul class="nav navbar-nav">
            <li><a href="#about">About</a></li>
            <li><a href="#services">Services</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
        </div><!-- /.navbar-collapse -->--%>
       </div><!-- /.container -->
     </nav> 
         <div class="container">
        <asp:ContentPlaceHolder ID="Content" runat="server">
            <asp:ContentPlaceHolder ID="Content1" runat="server"> 
            </asp:ContentPlaceHolder>

        </asp:ContentPlaceHolder>
    <div class="jumbotron hero-spacer">   
       <asp:ContentPlaceHolder ID="Content2" runat="server"> 
       </asp:ContentPlaceHolder>
     </div>
<asp:ContentPlaceHolder ID="Footer" runat="server">
    <footer>
        <div class="row">
          <div class="col-lg-12">
            <p>Copyright &copy; Aikya Dev Team 2013 </p>
          </div>
        </div>
      </footer>
</asp:ContentPlaceHolder>
  </div>
    </form>
</body>
</html>

I am trying to create a master page that will be used for logged in pages, the login name displayed must have a dropdown but i tried this but its not working it hovers when i go on to the label but dropdown menu never appears what is wrong with the code please someone help me on this

1 Answer 1

3

if you check your browser inspection tool, I think you may be having this error:

Error("Bootstrap requires jQuery")

Bootstrap.js has a jQuery dependency. So you need to load the jQuery first script before bootstrap.js.

this should be the order. right above the </body> tab. The path should be relative to where you have placed your file. NOTE: use /parent_folder/..path_to_your_files

<script src="/Scripts/jquery-1.9.0.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap.js" type="text/javascript"></script>

Hope this helps. :-)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.