简体   繁体   English

使用引导程序时冲突的母版页和内容页

[英]conflicting master and content page while using bootstrap

Iam using Master and Content page in asp.net C#.. In my webapplication i'm using bootstrap.. I got the error as Uncaught TypeError: $(...).datepicker is not a function 我在asp.net C#中使用“母版和内容”页面

If i attempt to solve the above error, the dropdown in master page is producing error as Uncaught TypeError: $(...).dropdown is not a function 如果我尝试解决上述错误,则母版页中的下拉列表会产生错误,因为Uncaught TypeError:$(...)。dropdown不是一个函数

Uncaught TypeError: $(...).datepicker is not a function (anonymous function) @ com_mst_CompanyRegistrationAdd.aspx:111 i @ jquery.min.js:2 fireWith @ jquery.min.js:2 ready @ jquery.min.js:2 K @ jquery.min.js:2

In Master Page: 在母版页中:

<script src="../Scripts/jquery-1.12.4.js"></script>
    <script src="../Scripts/jquery-1.12.4.min.js"></script>    
    <script src="../Scripts/bootstrap.js"></script>
    <script src="../Scripts/bootstrap.min.js"></script>
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
    <script>
$(document).ready(function() {
    $('dropdown-toggle').dropdown()
});
</script>

In the content page: 在内容页面中:

 <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#txtEstablishedDate").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,               
                });
        });
    </script>
    <script type="text/javascript">
        $(function () {

            $("#txtRCDate").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true
            });
        });
    </script>
    <script type="text/javascript">
        $(function () {
            $("#txtCstDate").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true
            });
        });

    </script>

Please help me to sort out the error.. 请帮助我找出错误..

Uncaught Type Error.I think You Are Using Jquery UI widgets. 未捕获的类型错误。我认为您正在使用Jquery UI小部件。 You Need To Paste The Below Script And Link Urls Below. 您需要粘贴以下脚本并在下面链接网址。

 <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

This Will Sort Out The Problem 这将解决问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM