0

I am using ASP.Net Web form in my MVC 5 application.

I want to use my Razor view layout in the ASP.Net web form. How can i do that?

Twix
  • 392
  • 1
  • 12
  • 38
  • Razor view layout?... did you mean Bootstrap? http://getbootstrap.com/examples/navbar-fixed-top/ – Edi G. Sep 12 '14 at 08:05
  • Similar question is here: http://stackoverflow.com/questions/5264852/can-we-use-razor-syntax-in-asp-net-webforms-aspx-pages – JSK Sep 12 '14 at 08:15
  • "using a web form in an MVC application"? That's unlikely, as they're two very different application architectures. Further, what do you mean by "how to use Razor view layout" Razor is a syntax, not a view layout. Even if it were a view layout, "how to use it" is way too broad/unclear a question to answer. – TylerH Apr 22 '19 at 18:07

3 Answers3

0

You can do this with ASP.NET web application using VS 2013 and add a MVC 5 View Page (Razor) on right clicking the Project.

JSK
  • 583
  • 6
  • 17
0

you can't , because ASP.Net Mvc and ASP.Net web form using a different view engine, you should use Mvc View Master Page or Master Page

bi ss
  • 1
-1

I'm not sure whether I get your question right. If you mean the Template layout frmo ASP.NET MVC.. this is from Bootstrap. If you mean the Concept "Masterpage-Layout-Page" for Winform, you can create a Masterpage:

  • Add -> New Item
  • Web Forms Master Page
  • Design and add ContentPlaceHolder for your Content..
  • Add -> New Item
  • Web Form with Master Page
  • Select your "Site".Master
Edi G.
  • 2,432
  • 7
  • 24
  • 33