views:

1026

answers:

6

I use Visual Studio's "Code Snippet" feature pretty heavily while editing c# code. I always wished I could use them while typing out my aspx markup.

Is there a way to enable code snippet use in an aspx file editor window?

Are there any third party tools that perform this?

If you're familiar with code snippet definitions, this is exactly the type of thing I want to do:

<asp:TextBox ID="$var$TextBox" Text="$text$" OnClick="$var$_Click" runat="server" />

I could activate the snippet, tab twice, and move on!

+2  A: 

That would be brilliant! I'd recommend the world's simplest code generator, or CodeSmith, or maybe T4 (although I haven't tried it yet). Doesn't quite do what you'd like, but it does make it a little easier

harriyott
T4 is very cool. I was just playing with it today...more of a replacement for Codesmith than snippets though.
Rory Becker
+2  A: 

Perhaps you might think of trying Coderush which has a lot more to offer than the basic snippets found in VS. It's template facility can operate in vb, cs, aspx, html, xml and sql files.

Rory Becker
For anone wishing additional help with coderush if they purchase it...please drop by the peer-peer forum @ http://community.devexpress.com/forums/115.aspx
Rory Becker
A: 

@Rory-Becker Coderush is exactly what I've been looking for!!

I had previously posted that Coderush costs $99, but it costs $249.

@harriyott

Codesmith has something called Active Snippets. It only comes with the professional version, which costs $399

http://www.codesmithtools.com/features/comparison.aspx

bentford
Not to rain on your parade, but I believe that Coderush costs $249. Renewal years are $99. But I will add that I think that it is totally worth it... and remember that a copy of RefactorPro (Amazing tool http://www.devexpress.com/refactor) is included in that price.
Rory Becker
+1  A: 

Since I can't afford the $249 for CodeRush, I started trying to build a VisualStudio Add-In.

This guy has allready done this for me: http://ardentdev.com/blog/index.php/aspxedithelper

bentford
+1  A: 

CodeRush Express is now free, you can download it from this link

Vin
Right on. I'm going to check this out!!
bentford
+1  A: 

At PDC 2008, Jeff King from Microsoft showed a demo of the HTML Snippets feature coming out in the next Visual Studio 2010. However, I put in another vote for CodeRush which is more powerful and you can use it now.

Mehul
I'm excited for the 2010 release. Meanwhile, I'm going to try coderush express.
bentford