Little lost right now...
I am following the following article to test/learn nested layouts. http://blogs.msdn.com/b/marcinon/archive/2010/12/15/razor-nested-layouts-and-redefined-sections.aspx
And i am getting the following error:
The type 'System.Web.IHtmlString' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. D:\Projects\Mvc3\Tests\RazorLayouts\Layout.MvcBase\Extensions\SectionExtensions.cs 15 36 Layout.MvcBase
I have name space System.Web referenced... and the blue line is on "RenderSection". public static HelperResult RenderSection
I just had this issue. You may need to add a reference to "System.Web" as well. That fixed it for me. Remember, not just the "using" statement, but actually adding a reference to it. I ran into this issue while setting up a test project for my controllers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With