Only for Beginner !How to Integrate theme in Visual Studio
Microsoft Net Framework

1.  Open the Visual Studio

2.  Take a new project and enter the name of your Project

3.  Click on Empty and further click on MVC (check box)
 
4.  Right Click on your Project Name and Add a New folder (Common)

5.  So which project you want to Paste in Visual Studio copy that and then paste in (Common) Folder

6.  Right click on Controller folder Click on Add and then Click on Controller

7.  Open the Controller Click the ActionResult and make the View Class

8.  You can see a View Folder in Solution Explore and click on 1st folder which name is Home and click on Index.cshtml and then click on 2nd folder Shared so you can see Layout@.cshtml click on it

9.  Go to (Common) folder click on your project and open index.html

10. Copy the whole Code from index.html page and paste in Layout.cshtml 

11. In body Section without Navbar and footer cut all the code which in body section and past in Index.cshtml

12. In Index.html you see the below code

@{
    ViewBag.Title = "Index";
   
}
...................................................


13.  So Add Layout="path of layout.csshtml"; like

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

...........................................................


14. Add the RenderBody(); tag in Layout.cshtml

...............................................................................


15. Last and Must important part for (CSS and Images) update there src="" and link because we add the project in (Common) folder

for example a link is 

    <link href="Shuffle/css/bootstrap.min.css" rel="stylesheet" type="text/css">

So update this link like 

    <link href="~/Common/Shuffle/css/bootstrap.min.css" rel="stylesheet" type="text/css">  

Share This with your friend by choosing any social account


Upcoming Articles
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM