.CSHTML File Extension

ASP.NET Razor Webpage

Developer: Microsoft

Learn about .CSHTML files and view a list of programs that open them.

What is a .cshtml file?

Learn about .CSHTML files and view a list of programs that open them.

Properties

Related Formats
3d3d23dm3ds3ds-to-dae3ds-to-dwg3ds-to-fbx3ds-to-glb3ds-to-gltf3ds-to-obj3ds-to-pdf3ds-to-ply3ds-to-stl3ds-to-usdz3mf3mf-to-3ds3mf-to-dae3mf-to-glb3mf-to-html3mf-to-obj

More Information

CSHTML files are similar to .VBHTML (Visual Basic HTML) files. However, they use syntax that is closer to the C# language than the Visual Basic language.

One easy way to recognize a CSHTML file is to look for @ symbols that precede Razor reserved directives and code blocks. CSHTML files use the @ symbol and Razor reserved directives to transition from HTML markup to C# code.

Most CSHTML files are created in Microsoft Visual Studio. Visual Studio provides syntax highlighting and Intellisense code suggestions that help developers create CSHTML files.

NOTE: Razor offers additional templating syntax operations besides those supported by the standard ASP.NET MVC default view engine.

Technical Details

CSHTML files are similar to .VBHTML (Visual Basic HTML) files. However, they use syntax that is closer to the C# language than the Visual Basic language.

One easy way to recognize a CSHTML file is to look for @ symbols that precede Razor reserved directives and code blocks. CSHTML files use the @ symbol and Razor reserved directives to transition from HTML markup to C# code.

Most CSHTML files are created in Microsoft Visual Studio. Visual Studio provides syntax highlighting and Intellisense code suggestions that help developers create CSHTML files.

NOTE: Razor offers additional templating syntax operations besides those supported by the standard ASP.NET MVC default view engine.

How to open .cshtml files

You can open and edit a CSHTML file in any text or source code editor. Source code editors, such as Microsoft Visual Studio Code (cross-platform) and GitHub Atom (cross-platform), contain helpful features that make reviewing and editing CSHTML files easier.

Programs that open .cshtml files:

Windows
Microsoft Visual Studio
Microsoft Visual Studio Code
GitHub Atom
Open over 400 file formats with File Viewer Plus.Free Download
Microsoft Visual Studio 2022

Quick Facts

File Extension
.cshtml
Developer
Microsoft
File Type
ASP.NET Razor Webpage
Last Updated
2025-11-02T02:43:26.505Z

Related File Types

CSHTML File - ASP.NET Razor Webpage | What is .cshtml?