简体   繁体   English

使用VisualStudio 2012在MVC4中安装TwitterBootStrap

[英]Installing TwitterBootStrap in MVC4 Using VisualStudio 2012

I am trying to install TwitterBootstrap in MVC4 Application using nugget package manager. 我正在尝试使用块软件包管理器在MVC4应用程序中安装TwitterBootstrap。 Here I followed the procedure. 在这里,我按照程序进行。

  1. Created An Empty MVC4 Application. 创建一个空的MVC4应用程序。
  2. Gone to Nugget package manager and installed the package named Twitter Bootstrap for ASP.Net MVC4 Sample. 去了Nugget软件包管理器,并安装了名为Twitter Bootstrap的ASP.Net MVC4 Sample软件包。
  3. As I Click on install the following packages are installed. 当我单击安装时,将安装以下软件包。 -->Twitter BootStrap for Asp.net MVC4(BootStrap Layout) -->Twitter BootStrap for Asp.net MVC4(HTML Helpers for Project) -->BootStrap 3.0.0 ->适用于Asp.net MVC4的Twitter BootStrap(BootStrap布局)->适用于Asp.net MVC4的Twitter BootStrap(用于项目的HTML Helpers)-> BootStrap 3.0.0
  4. AS I completed the installation so many files like controllers, views, .css and .js files are created. 我完成安装后,创建了许多文件,例如控制器,视图,.css和.js文件。
  5. When I run the application in any browser the styles are not applying to the views. 在任何浏览器中运行应用程序时,样式均不适用于视图。 The Output looks as following. 输出如下。 没有样式显示 6.What might be the problem? 6.可能是什么问题? Is there any workaround to overcome this issue? 有没有解决此问题的方法? 7.Kindly provide suggestions. 7.请提供建议。

Thanks in advance. 提前致谢。

It seems the bootstrap.css path is wrongly configured on "\\~App_Start\\BootstrapBundleConfig.cs" file. 似乎bootstrap.css路径在“ \\〜App_Start \\ BootstrapBundleConfig.cs”文件中配置错误。 Make the following changes it will work. 进行以下更改,它将起作用。

  "~/Content/bootstrap/bootstrap.css",

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

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