jQuery DataTable在MasterPage中不能在Asp.net WebForm中工作

时间:2014-12-12 23:59:39

标签: jquery jquery-plugins webforms datatables

我在主页面的WebForm中使用jQuery dataTable时遇到问题

每次我编写所需的JavaScript以启用jQuery dataTable Nothing发生

任何人都知道如何制作这个jQuery Table Works Inside Content Place Holder

由于



<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Main.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="PrimeHealth_Network.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
                                <div class="panel-body">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                        <thead>
                                            <tr>
                                                <th>Rendering engine</th>
                                                <th>Browser</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <asp:ListView ID="AllLocationsList" runat="server">
                                                    <itemtemplate>
                                                         <tr>
                                                              <td><%#Eval("LocID")%></td>
                                                                <td><%#Eval("LocationName")%></td>
                                                         </tr>
                                                    </itemtemplate>
                                            </asp:ListView>
                                        </tbody>
                                    </table>
                                </div>

                            </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
        <script src="assets/js/jquery-1.10.2.js"></script>
    <!-- BOOTSTRAP SCRIPTS -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- METISMENU SCRIPTS -->
    <script src="assets/js/jquery.metisMenu.js"></script>
    <!-- DATA TABLE SCRIPTS -->
    <script src="assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
    <script>
        $(document).ready(function () {
            $('#dataTables-example').dataTable().Editable();
        });
    </script>
</asp:Content>
&#13;
&#13;
&#13;

0 个答案:

没有答案