InCodesmith, The following shortcut keys help us quickly enter.
1.CTRL + Shift + c
On the empty line, pressCTRL + Shift + cEnterCodeBlock.
<% %>
2.CTRL + Shift + q
PressCTRL + Shift + qEnter a script block.
< Script runat = " Template " >
</ Script >
3.CTRL + Shift + V
Reverse the code block, such as the following code line:
<% For ( Int I = 0 ; I < 10 ; I ++ ) {} %>
Press between two bracesCTRL + Shift + VThe Code is as follows:
<% For ( Int I = 0 ; I < 10 ; I ++ ) {%><%} %>
4.CTRL + Shift + W
PressCTRL + Shift + WThen, an output code block is entered:
<% = %>
Note: when using the shortcut key, if you want to place a piece of code in the middle of the mark, select the code first, and then press the shortcut key combination. For example, if we have a piece of code like this, we want to put it in<SCRIPT>.
Public Enum Collectiontypeenum
{
Vector,
Hashtable,
Sortedlist
}
Public Override Void Render (textwriter writer)
{
Streamwriter filewriter1 = New Streamwriter ( @" C: \ test1.cs " , True );
This . Response. addtextwriter (filewriter1 );
Streamwriter filewriter2 = New Streamwriter ( @" C: \ test2.cs " , True );
This . Response. addtextwriter (filewriter2 );
Base . Render (writer );
Filewriter1.close ();
Filewriter2.close ();
}
Select it, and then pressCTRL + Shift + qThen it will become:
< Script runat = " Template " >
Public Enum Collectiontypeenum
{
Vector,
Hashtable,
Sortedlist
}
Public Override Void Render (textwriter writer)
{
Streamwriter filewriter1 = New Streamwriter ( @" C: \ test1.cs " , True );
This . Response. addtextwriter (filewriter1 );
Streamwriter filewriter2 = New Streamwriter ( @" C: \ test2.cs " , True );
This . Response. addtextwriter (filewriter2 );
Base . Render (writer );
Filewriter1.close ();
Filewriter2.close ();
}
</ Script >