Reputation: 100567
My goal is to be able to quickly type this:
<%= %>
Can anyone suggest a way to make it easier within Visual Studio to insert the HTML code escape block. (I am not even sure the name of this piece of code!)
I realize that typing <%
in the code editor will autocomplete the escape block for me, but perhaps there's an easier way to input this block?
Perhaps there is a snippet or existing key combo built into Visual Studio to accomplish this?
Even further, this would be nice as well:
<%= Html.Encode() %>
Upvotes: 0
Views: 1381
Reputation: 3680
Even if you created a snippet to do that, given VS does automatic matching, wouldnt it be more keystrokes to enter the snippet, than to actually type the 3 characters?
Upvotes: 2
Reputation: 6670
Sorry but it looks like snippets are not available for ASP.Net markup.
From this guy
Snippets are in VS2008 available for C#, XML and VB.NET files. In VS2010 that support extends to ASP.NET markup also.
Upvotes: 1
Reputation: 2784
Create a snippet and use Ctrl-K, Ctrl-X(VS 2005) and that will let you select the snippet!
Upvotes: 1