Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Free CSS Templates with ASP.NET MVC 4?

I need to use a css template for webpage I am building but I don't know how to use in asp.net mvc4. so How to use CSS Templates with ASP.NET MVC 4 in visual studio 2012 for web application?

like image 582
Jafar Muzeyin Avatar asked Jan 18 '26 10:01

Jafar Muzeyin


1 Answers

It's simple:

  1. Move your css and images into ~/Contents folder.

  2. Move your js files into ~/Scripts folder

  3. Copy and paste your html snippets to cshtml files

    On 3rd step you need to port the layout portion of your template to ~/Veiws/Shared/_Layout.cshtml. Here you need to point references to your css and js correctly. For example:

    And also you need to be aware that _Layout.cshtml should contain @RenderBody(). That's where all child views will be inserted.

Just found a video with basic demonstration of process: link

like image 158
Oleksii Aza Avatar answered Jan 20 '26 22:01

Oleksii Aza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!