I tested the application locally, which perfectly debugs my local computer. When I publish it on the server at work, _layout.cshtml does not render. They may not have any style at all, from the appearance of the developer tools. Any suggestions because I'm at a standstill and Google hasn’t found any such scripts for me? I am using MVC5 with Razor
My browsing begins
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
Edited version .... my _layout page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - XXXXXXXXXXX</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<meta name="Training Module" content="Website for oreintation and traing modules" />
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<img src="/Images/imgCClogoHorizontal.jpg" style="float: left; padding-top: 10px" />
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div style="padding-left: 30px">
@Html.ActionLink("XXXXXXXXXXXX", "Index", "Module", null, new { @class = "navbar-brand" })
</div>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
@* <li>@Html.ActionLink("Home", "Index", "Home")</li>*@
@* <li>@Html.ActionLink("About", "About", "Home")</li>*@
@* <li>@Html.ActionLink("Orientation Videos", "Index", "Video")</li>*@
</ul>
</div>
</div>
</div>
@Html.Action("Index", "NavigationMenu")
<div class="container body-content">
<div style="display: inline">
<div style="float: left">
@RenderBody()
</div>
<h2> </h2>
</div>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>
my bundle.config ...
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css",
"~/Content/themes/base/jquery-ui.css"));
}
}
}
KBriz source
share