Search code examples
webformsdotvvm

DotVVM page inside ASP.NET webForms Site.master


I have an existing ASP.NET webForms web site project. I would like to use dotvvm in one page of the website. I have successfully created and placed a sample content page .dothtml inside dotvvm master page .dotmaster but is there any way I can place it inside my website Site.master?

I have tried to use the Site.master as master page like that:

@masterPage Site.master

but it gives me an error message because Site.master doesn't have @viewModel line at top of it.

I am working with visual studio 2015 community version with 4.5.2 .NET framework


Solution

  • Unfortunately, DotVVM doesn't have this level of integration yet.

    If you want to combine ASP.NET Web Forms and DotVVM pages in one application, you need to create a DotVVM master page which uses the same layout and CSS.