James Jones
James Jones

Reputation: 8783

How to use Razor syntax in ASP.NET Web Application (not MVC)

How does one create a .cshtml page in an ASP.NET web application? The option to choose Razor is obvious when using MVC - it appears when adding a view. But I can't seem to figure out how to accomplish this in a plain ASP.NET Web Application. Is it even possible?

Upvotes: 6

Views: 1409

Answers (1)

SLaks
SLaks

Reputation: 888283

Create an HTML file and rename it to CSHTML.

Although Razor pages don't appear in the Add New Item list, they work fine in normal web projects.

Upvotes: 5

Related Questions