Added: 1 year ago
From: dmchitnis
Views: 34,162
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (17)

Sign In or Sign Up now to post a comment!
  • You don't need to copy that line in your _Layout.cshtml file, just move the file to ~/Views/Shared/ folder and modify path to it in _ViewStart.cshtml (If you wish to keep original _Layout.cshtml file, just put the new one in some folder or rename it).

  • Very good video Thanks

  • NIce I liked this idea and I am going to try this Thanks so much 

  • in my _Layout.cshtml I have not found:

    @inhertis System.Web.Mvc.WebViewPage

    what should I do ??

  • @menyarito1 Did anybody ever answer you on this question? I have the same issue.. :(

  • Great, thank you very much

  • thank you very much.....

  • Thanks for this video. It helped me change the default look of my site in ASP.NET MVC.

  • Very good tutorial, I'm sure the MVC community will appreciate it.

    For the advanced users though, I would recommend putting the template in Content but not creating layout.cshtml in the same folder, instead leave it on Shared as it is. Just change the content of Layout.cshtml to the content in index.html and make the appropriate changes in the HTML code to point to the CSS and images.

    This because it would kill the spirit of MVC to put it in the Content folder rather than leaving it at View.

  • Thank you very much..

  • Thanks for the great video.

  • You can also use Views/ViewStart.cshtml file to put the

    Layout = "~/Views/Shared/_Layout.cshtml­"; once and for all so dont need to change

    each page like this

  • hey thanks... this was great! The new Razor engine just keeps giving back!

  • ASP.NET MVC 3 Beta now has support for VB. There are vbhtml counterparts for every cshtml files, so this should be really easy now.

  • I am trying to do something similar as what you did in this video but with using VB.Net, instead of C and there was not something like _layout.cshtml, instead I changed Site.Master and that worked. There are a few minor difference, but I think people will manage to find the differences.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more