Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to add template layout in mvc5, I want to add my own template on my project
so I want the step by step code that I can follow?
Posted

download the source from this link

ASP.NET MVC 5 - Bootstrap 3.0 in 3 Steps[^]
 
Share this answer
 
step 1 :Drag the css layout to the project
make sure that every referenced file in the css layout is inside the folder you are dragging into the project

step2: change the html file extension from html to cshtml.
e.g index.html to index.cshtml

step3: open the html file, select the first line of the file, reference webview page @inherits System.Web.Mvc.WebViewPage on the cshtml file.

step4: Rendering body - anywhere between <body> </body> you have to render the html body used as @Renderbody()

Please follow steps above
 
Share this answer
 
v3

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