Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am working on vs 2012 and mvc 4 ,just small project , i need to apply theme( http://all-free-download.com/free-website-templates/download/magic_city_template_2087.html[^] )and remove default one ,can any one help me how to do this ??

What I have tried:

i have done all copying stuff ,but facing problem in bundle.config and _layout.cshtml

i want help regarding bundle.config and _layout.cshtml ,
Posted
Updated 21-Sep-17 1:11am
v2
Comments
Richard MacCutchan 21-Sep-17 5:41am    
Please edit your question, explain what the problem is, and what help you are looking for.
erummirza 21-Sep-17 6:20am    
i need to integrate theme magic city with my project
Richard MacCutchan 21-Sep-17 6:51am    
Did you actually read the message I posted above?

1 solution

Steps to Apply a Bootstrap theme,

Step 1 : Copy all the Css and Java scripts inside the application.

Step 2 : Then add the related css files and java script files in the bundle.config like the below code.

Scripts:
//--------------      jQgrid     ----------------
       bundles.Add(new ScriptBundle("~/bundles/jqgrid").Include(
                             "~/Scripts/free-jqGrid/i18n/grid.locale-en.js",
                             "~/Scripts/free-jqGrid/jquery.jqgrid.min.js"));

CSS :
//--------------   Magic  Bootstrap     ----------------

bundles.Add(new StyleBundle("~/Content/magictheme").Include(
    "~/Content/bootstrap-dialog.css",
    "~/Content/assets/plugins/bootstrap/css/bootstrap.min.css"));


Step 2 : Add a layout.cshtml add these bundle names :
CSS :
<!-- standard jqGrid CSS -->
   @Styles.Render("~/Content/magictheme")


Scripts :
@Scripts.Render("~/bundles/jqgrid")


Step 2 : Please clear the browser history and then try again. These are the steps for bundling in ASP.NET MVC application.


If you are adding a wrong path of either css file or a java script file , you will be getting errors in the Bundle.config. Just check if all the paths specified in the bundle.config are correct.

Please let me know if you have any issues.
 
Share this answer
 
Comments
Jeyakrishnaraja G 22-Sep-17 2:56am    
Thanks @vaidhya P. The above steps were very clear. Its working for me :)
Vaidhya.P 26-Sep-17 3:44am    
Thanks Jeyakrishnaraja :)
Easvarr Eash 26-Sep-17 4:12am    
awesome, great job !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900