.RAZOR 文件扩展名

Razor Component File

开发者 Microsoft
受欢迎程度
3.5  |  2 
 

什么是 RAZOR 文件?

A RAZOR file is a Razor component used by a Blazor app. It contains source code written using Razor markup, C#, and HTML. RAZOR files define a self-contained portion of a Blazor app's user interface (UI).

更多信息

在 Microsoft Visual Studio Code 中打开的 .razor 文件截图
在 Microsoft Visual Studio Code 中打开的 RAZOR 文件

Blazor is a .NET framework that developers can use to build interactive client-side web UIs. Notably, Blazor allows developers to develop UI components using C# instead of JavaScript and to share server-side and client-side app logic written in .NET.

Developers build Blazor applications using Razor components, which are source code files written using Razor syntax and saved using the .razor extension. Razor syntax allows developers to efficiently combine HTML markup with C# code in the same source code file, to create dynamic web content. A Razor component defines a piece of a Blazor app's UI, such as a webpage, dialog box, or data entry form.

One easy way to recognize a RAZOR file is to look for @ symbols that precede Razor directives and code blocks. For example, Razor uses the @page directive to specify a component's relative URL, and it uses the @if directive to control when code runs. RAZOR files use the @ symbol and reserved directives to transition from HTML markup to C# code.

注: Non-Blazor files that use Razor syntax are saved as .CSHTML files.

如何打开 RAZOR 文件

You can open and edit a RAZOR 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 RAZOR files easier.

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

可打开 RAZOR 文件的程序

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

验证者 FileInfo.com

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

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