I am new to MVC4 and Bundling concepts. For me CSS file is loading properly , but the images specified in it not loaading and it shows 404 exception for it.
My CSS folder structure is: ~\Content\css\CustomCss\green.css
Images for CSS folder structure : Content\css\Customcss\Images\green.png
But while checking in net panel of Firebug, it shows the path for images as : /Content/css/CustomCSS/Content/css/Customcss/Images/Greenish.png
I don’t know how this bundling refers images in CSS.
BundleConfig.cs:
bundles.Add(new StyleBundle("~/Content/css/CustomCss/css").Include("~/Content/css/CustomCss/Syncfusion-Grid-Greenish.css"));
Layout.cshtml:
@Styles.Render(" ~/Content/css/CustomCSS/css")
Suggest me any ideas.
Thanks.
Finally got the answer after a small struggle.
I just replaced the image url as ‘ images/Greenish_sprite.png ‘ instead of ‘Content/css/Customcss/images/Greenish_sprite.png’.
It is working well now 🙂