Solved

Why Bundles is not working on certain files - ASP MVC

Posted on 2016-11-14
3
20 Views
Last Modified: 2016-11-17
Hi Experts,

I added a bunch of css previously and its working fine  in bundles config file . But last time added some more css and am not able to get the css . It throws no error and my site is loading without those css.


 bundles.Add(new StyleBundle("~/css/Home").Include(
                "~/css/grid12.css",
                "~/css/james_typography.css",
                "~/css/main.css",
                "~/css/color_scheme_light.css",
                "~/css/colors/color_palette_blue.css",
                "~/css/rapid-icons.css",
                "~/css/js_styles/jquery.maximage.min.css",
                "~/css/responsivity.css",
                "~/css/animate.css",
                "~/css/nivo-lightbox.css",
                "~/css/nivo_lightbox_themes/default/default.css",
                "~/css/owl.carousel.css",
                "~/css/owl.theme.css",
                "~/css/owl.transitions.css"
                ));

Open in new window









Thanks in Advance Experts
0
Comment
Question by:karthik80c
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
SSupreme earned 500 total points
Comment Utility
Try it like this:
@Styles.Render("~/css/home.css")
bundles.Add(new StyleBundle("~/css/home.css").Include(
                "~/css/grid12.css",
                "~/css/james_typography.css",
                "~/css/main.css",
                "~/css/color_scheme_light.css",
                "~/css/colors/color_palette_blue.css",
                "~/css/rapid-icons.css",
                "~/css/js_styles/jquery.maximage.min.css",
                "~/css/responsivity.css",
                "~/css/animate.css",
                "~/css/nivo-lightbox.css",
                "~/css/nivo_lightbox_themes/default/default.css",
                "~/css/owl.carousel.css",
                "~/css/owl.theme.css",
                "~/css/owl.transitions.css"
                ));

Open in new window

Make sure you don't have home.css in that directory
1
 

Author Comment

by:karthik80c
Comment Utility
Why we don't have  home.css in directory . Is there any reason on this
0
 
LVL 16

Expert Comment

by:SSupreme
Comment Utility
Because it creates virtual file, and if there is a file with same name it could break execution. You can give it any name as long as it doesn't exist in that folder.
1

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
erros on link  checking 2 42
Centering a div in html5 5 46
Basic CSS issues 6 20
increase words that display in widget 6 11
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now