ReSharper 2016.1 Help

Predefined File Templates for ASP.NET (C#)

ReSharper | Templates Explorer | File Templates | ASP.NET (C#)

This topic lists all predefined file templates for ASP.NET (C#) in ReSharper 2016.1.1. For more information about file templates, see Creating Files from Templates

TemplateDetails
MVC View Page with master page

MVC View Page with master page

Scope ASP.NET (C#) projects

Body

<%@ Page Title="$Title$" Language="C#" Inherits="System.Web.Mvc.ViewPage<$ModelType$>" MasterPageFile="$MasterPage$" %> $CONTENT$

Parameters

  • Title - no macro
  • ModelType - Guess type expected at this point (guessExpectedType)
  • MasterPage - Show smart code completion list at the point where the variable is evaluated (completeSmart)
  • CONTENT - Generate content for masterpage content placeholders at the point where the variable is evaluated (AspMasterpageContentGenerator)
MVC View Page without master page

MVC View Page without master page

Scope ASP.NET (C#) projects

Body

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<$ModelType$>" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>$Title$</title> </head> <body> $END$ </body> </html>

Parameters

  • ModelType - Guess type expected at this point (guessExpectedType)
  • Title - no macro
  • END - The caret position after the template is applied.
MVC View UserControl

MVC View UserControl

Scope ASP.NET (C#) projects

Body

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<$ModelType$>" %> $END$

Parameters

  • ModelType - Guess type expected at this point (guessExpectedType)
  • END - The caret position after the template is applied.
Web form without master page

Web form without master page

Scope ASP.NET (C#) projects

Body

<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>$Title$</title> </head> <body> <form id="$form1$" runat="server"> <div> $END$ </div> </form> </body> </html>

Parameters

  • Title - no macro
  • form1 - When exectuted in variable declaration (where variable name should stand), suggests name for the variable. (suggestVariableName)
  • END - The caret position after the template is applied.
Web form with master page

Web form with master page

Scope ASP.NET (C#) projects

Body

<%@ Page Title="$Title$" Language="C#" MasterPageFile="$MasterPage$" %> $CONTENT$

Parameters

  • Title - no macro
  • MasterPage - Show smart code completion list at the point where the variable is evaluated (completeSmart)
  • CONTENT - Generate content for masterpage content placeholders at the point where the variable is evaluated (AspMasterpageContentGenerator)
Master page without base master page

Master page without base master page

Scope ASP.NET (C#) projects

Body

<%@ Master Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder id="$head$" runat="server"> $END$</asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <asp:ContentPlaceHolder id="$ContentPlaceHolder1$" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html>

Parameters

  • head - When exectuted in variable declaration (where variable name should stand), suggests name for the variable. (suggestVariableName)
  • ContentPlaceHolder1 - When exectuted in variable declaration (where variable name should stand), suggests name for the variable. (suggestVariableName)
  • END - The caret position after the template is applied.
Master page with base master page

Master page with base master page

Scope ASP.NET (C#) projects

Body

<%@ Master Language="C#" MasterPageFile="$MasterPage$" %> $CONTENT$

Parameters

  • MasterPage - Show smart code completion list at the point where the variable is evaluated (completeSmart)
  • CONTENT - Generate content for masterpage content placeholders at the point where the variable is evaluated (AspMasterpageContentGenerator)
Web control

Web control

Scope ASP.NET (C#) projects

Body

<%@ Control Language="C#" ClassName="$ClassName$" %> $END$

Parameters

  • ClassName - Evaluates current file name without extension (getFileNameWithoutExtension)
  • END - The caret position after the template is applied.
Last modified: 19 August 2016