what is a razor file

vivaan 20 Reputation points
2025-05-08T07:31:19.6666667+00:00

it is a razor file... a app they said in a training for asp.net core

ASP.NET Core Training
ASP.NET Core Training
ASP.NET Core: A set of technologies in the .NET Framework for building web applications and XML web services.Training: Instruction to develop new skills.
66 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pradeep M 8,585 Reputation points Microsoft External Staff Moderator
    2025-05-08T08:21:50.05+00:00

    Hi vivaan,

    Thank you for reaching out to Microsoft Q & A forum.  

    A Razor file in ASP.NET Core combines HTML and C# code, allowing developers to build dynamic web pages or user interface components.  Files with the .razor extension are used in Blazor applications, while .cshtml files are used in Razor Pages or MVC apps.  When the training mentions "a Razor file," it refers to a file that defines part of the app’s UI logic using Razor syntax. 

    For more information about Razor syntax and how it’s used in ASP.NET Core, please refer to the following documentation: 

    1.Razor syntax overview: 

    https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor 

    2.Razor Pages: 

     https://learn.microsoft.com/en-us/aspnet/core/razor-pages/ 

    3.Blazor components (.razor files):  

    https://learn.microsoft.com/en-us/aspnet/core/blazor/components    

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.  

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.