jQuery数据表引导在发布时无法正常工作

时间:2019-03-12 14:45:05

标签: asp.net visual-studio-2013 datatables webforms

我发现是什么导致我的jquery数据表分页不起作用。似乎问题是当我在引用上使用此

dataTables.bootstrap4.css/js

这是我的捆绑包

 public static void RegisterBundles(BundleCollection bundles)
    {
        bundles.Add(new ScriptBundle("~/Bundles/jquery").Include(
           "~/Scripts/jquery-{version}.js"));

        bundles.Add(new ScriptBundle("~/Bundles/angularjs").Include(
           "~/Scripts/angular.min.js"));

        bundles.Add(new ScriptBundle("~/Bundles/adminlte").Include(
            "~/AdminLTE/dist/js/adminlte.js",
            "~/AdminLTE/plugins/bootstrap/js/bootstrap.bundle.js",
            "~/AdminLTE/plugins/datatables/jquery.dataTables.js",  
            "~/AdminLTE/plugins/datatables/dataTables.bootstrap4.js",         
            "~/AdminLTE/plugins/datepicker/bootstrap-datepicker.js",
            "~/AdminlTE/plugins/iCheck/icheck.min.js"));

        bundles.Add(new ScriptBundle("~/Bundles/jqueryui").Include(
            "~/Scripts/jquery-ui-{version}.js"));

        bundles.Add(new ScriptBundle("~/Bundles/jqueryval").Include(
            "~/Scripts/jquery.unobtrusive*",
            "~/Scripts/jquery.validate*"));            

        bundles.Add(new ScriptBundle("~/Bundles/js").Include(
        "~/Scripts/MasterPage/menu-selection.js",
        "~/Scripts/MasterPage/notification.js",
        "~/Scripts/Pages/main.js",
        "~/Scripts/Pages/DataTable.js",
        "~/Scripts/Pages/Validation.js",
        "~/Scripts/Pages/Datepicker.js"));

        bundles.Add(new ScriptBundle("~/Bundles/fontawesome").Include(
            "~/Scripts/fontawesome/all.js"));

        bundles.Add(new ScriptBundle("~/Bundles/iziToast").Include(
            "~/Scripts/iziToast/iziToast*"));

        bundles.Add(new ScriptBundle("~/Bundles/modernizr").Include(
           "~/Scripts/modernizr-*"));

        bundles.Add(new StyleBundle("~/Content/login-form").Include(
            "~/Content/Login/login-formas.css"));

        bundles.Add(new StyleBundle("~/Content/fontawesome").Include(
            "~/Content/fontawesome-all*"));

        bundles.Add(new StyleBundle("~/Content/iziToast").Include(
            "~/Content/iziToast*"));

        bundles.Add(new StyleBundle("~/Content/adminlte").Include(
            "~/AdminLTE/dist/css/adminlte*",
            "~/AdminLTE/plugins/datatables/dataTables.bootstrap4.css",
            "~/AdminLTE/plugins/datepicker/datepicker3.css",
            "~/AdminLTE/plugins/iCheck/all.css"));

        bundles.Add(new StyleBundle("~/Content/css").Include(
           "~/Content/MasterPages/layout.css",
           "~/Content/MasterPages/fieldset.css"));
    }    

和在母版页上

 <asp:PlaceHolder runat="server">



    <%: Styles.Render("~/Content/adminlte") %>
    <%: Styles.Render("~/Content/fontawesome") %>
    <%: Styles.Render("~/Content/iziToast") %>
    <%: Styles.Render("~/Content/css") %>

    <%: Scripts.Render("~/Bundles/jquery") %>
    <%: Scripts.Render("~/Bundles/angularjs") %>
    <%: Scripts.Render("~/Bundles/adminlte") %>
    <%: Scripts.Render("~/Bundles/jqueryval") %>
    <%: Scripts.Render("~/Bundles/fontawesome") %>
    <%: Scripts.Render("~/Bundles/iziToast") %>
    <%: Scripts.Render("~/Bundles/js") %>

</asp:PlaceHolder>

在localhost上工作正常,但是当我仅将其发布到IIS中的文件夹时,分页不起作用...

反正我可以继续在主机上使用这种样式吗?

0 个答案:

没有答案