.CSHTML 文件扩展名

ASP.NET Razor Webpage

开发者 Microsoft
受欢迎程度
4.1  |  46 
 

什么是 CSHTML 文件?

A CSHTML file is a C# HTML webpage file used by Razor, an ASP.NET view engine that generates webpages. It is similar to a standard ASP.NET webpage (.ASP or .ASPX file) but uses slightly different syntax. CSHTML files run on a web server, which generates HTML for a client web browser.

更多信息

在 Microsoft Visual Studio Code 中打开的 .cshtml 文件截图
在 Microsoft Visual Studio Code 中打开的 CSHTML 文件

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.

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

如何打开 CSHTML 文件

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.

使用File Viewer Plus打开 400 多种文件格式。免费下载

可打开或引用 CSHTML 文件的程序

分类: 网页
更新时间: 2021-10-26

验证者 FileInfo.com

FileInfo.com 团队 独立研究了本页面列出的 ASP.NET Razor Webpage 文件格式和 Mac, Windows, and Linux 应用。 我们的目标是达到 100% 的准确率,并且仅发布我们已验证过的文件类型信息。

如果您想为此页面提出新增或更新建议,请告诉我们