Predefined File Templates for Razor (C#)
This topic lists all predefined file templates for Razor (C#) in JetBrains Rider 2021.1. For more information about file templates, see Create Files from Templates
Template | Details |
---|---|
Razor MVC Partial View | Razor MVC Partial View Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
$END$ Parameters
|
Razor MVC View | Razor MVC View Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>$title$</title>
</head>
<body>
<div>
$END$
</div>
</body>
</html> Parameters
|
Razor MVC View with Layout | Razor MVC View with Layout Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
@{
ViewBag.Title = "$title$";
Layout = "$_Layout$";
}
<h2>$title$</h2>
$END$ Parameters
|
Controller | Scope Razor ASP.NET Framework projects Body $HEADER$using System.Web.Mvc;
namespace $NAMESPACE$
{
public class $CLASS$: Controller
{
// GET
public ActionResult Index()
{
$END$return View();
}
}
} Parameters
|
Component | Scope Blazor (C#) Projects Body <h3>$COMPONENTNAME$</h3>
@code {
$END$
} Parameters
|
Page | Scope Blazor (C#) Projects Body @page "/$PAGENAME$"
<h3>$PAGENAME$</h3>
@code {
$END$
} Parameters
|