ReSharper | Templates Explorer | Live Templates | ASP.NET
This topic lists all predefined live templates for ASP.NET in ReSharper 2022.1. For more information about live templates, see Create source code using live templates
Template
Details
ctx
Current file context
Scope everywhere
Body
$CTX$
Parameters
CTX - Provides list of items describing current context. This includes file name, containing type name, namespace name, etc. (context)
nguid
Insert new GUID
Scope everywhere
Body
$GUID$
Parameters
GUID - Generates new Globally Unique Identifier (GUID) (guid)
<script
Create script tag
Scope HTML and similar tags
Body
<script type="$attributeValue$">$END$</script>
Parameters
attributeValue - Suggest attribute value for current html tag attribute (suggestAttributeValue)
END - The caret position after the template is applied.
t
Create ASP.NET tag
Scope ASP.NET tags
Body
<$TAG$ $RUNATSERVER$>$END$</$TAG$>
Parameters
TAG - Suggest tag name used in current document (suggestTagName)
RUNATSERVER - Insert runat="server" if server-side tag selected (runAtServer)
END - The caret position after the template is applied.
Before expansionAfter expansion
tc
Create closed tag
Scope ASP.NET tags
Body
<$TAG$ $RUNATSERVER$$END$/>
Parameters
TAG - Suggest tag name used in current document (suggestTagName)
RUNATSERVER - Insert runat="server" if server-side tag selected (runAtServer)
END - The caret position after the template is applied.
Before expansionAfter expansion
a
Create tag attribute
Scope HTML and similar attributes
Body
$ATTR$="$END$"
Parameters
ATTR - Suggests attribute name used in the same tags in current document (suggestAttributeNameByTag)
END - The caret position after the template is applied.