问题描述:

In my localhost, all these features or functions are working well. After I deployed this to web server, I was wondering why it is functioning anymore. The bootstrap modal which I used is not working anymore.

Below is my layout file:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8" />

<title>@ViewBag.Title - PETC CARF</title>

<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />

<meta http-equiv="X-UA-Compatible" content="IE=edge"/>

<meta name="viewport" content="width=device-width" />

@Scripts.Render("~/bundles/jquery")

@Styles.Render("~/Content/css")

@Scripts.Render("~/bundles/modernizr")

<script src="~/Scripts/jquery-1.8.2.min.js"></script>

<script src="~/Scripts/vendor/jquery-1.7.1.min.js" type="text/javascript"></script>

<!-- FontAwesome 4.3.0 -->

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

</head>

@Scripts.Render("~/bundles/jquery")

@Scripts.Render("~/bundles/jqueryui")

@RenderSection("Scripts",required: false)

Here is my BundleConfig.cs

using System.Web;

using System.Web.Optimization;

namespace PETC_CARF

{

public class BundleConfig

{

// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725

public static void RegisterBundles(BundleCollection bundles)

{

bundles.Add(new ScriptBundle("~/bundles/jquery").Include(

"~/Scripts/jquery-{version}.js", "~/Scripts/jquery-1.8.2.min.js",

"~/Scripts/jquery-ui-1.8.24.min.js",

"~/Scripts/bootstrap.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/jqueryval").Include(

"~/Scripts/jquery-migrate-1.2.1.js",

"~/Scripts/jquery.unobtrusive*",

"~/Scripts/jquery.validate*"));

// Use the development version of Modernizr to develop with and learn from. Then, when you're

// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(

"~/Scripts/modernizr-*"));

bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css","~/Content/bootstrap.css","~/Content/font-awesome.css","~/Content/font-awesome.min.css","~/Content/style.css"));

bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(

"~/Content/themes/base/jquery.ui.core.css",

"~/Content/themes/base/jquery.ui.resizable.css",

"~/Content/themes/base/jquery.ui.selectable.css",

"~/Content/themes/base/jquery.ui.accordion.css",

"~/Content/themes/base/jquery.ui.autocomplete.css",

"~/Content/themes/base/jquery.ui.button.css",

"~/Content/themes/base/jquery.ui.dialog.css",

"~/Content/themes/base/jquery.ui.slider.css",

"~/Content/themes/base/jquery.ui.tabs.css",

"~/Content/themes/base/jquery.ui.datepicker.css",

"~/Content/themes/base/jquery.ui.progressbar.css",

"~/Content/themes/base/jquery.ui.theme.css"));

BundleTable.EnableOptimizations = false;

}

}

}

相关阅读:
Top