views:

97

answers:

3

I'm extremely annoyed with the way Visual Studio works when I write inline C#/MVC in the View. I think the source is horrendous to look at, and I wonder if there aren't some alternatives available, to make the View-code look prettier.

Perhaps some kind of extension-language or pre-processing formatting...

** EDIT **

Found:

  • Spark
  • NHalm

any other suggestions ?

+2  A: 

I found the Spark view engine cleans thing up.

http://sparkviewengine.com/

Miyagi Coder
Spark looks really nice! :) I just stumbled over NHalm myself... have a look at it :-)
CodeMonkey
+1  A: 

If you just want the existing engine to be prettier.... well, tough - it is what it is. You can try to take care when laying it out, and move common code into methods (perhaps extension methods on HtmlHelper for common code) to reduce the noise, but that's about it.

However, you are not limited this this engine - you can use any suitable template engine (or write your own).

Marc Gravell
+1  A: 

In general you need to avoid writing too much C# in your Views. They should contain primary HTML which should be readable. Also there are some alternative view engines to the default WebForms.

Darin Dimitrov
Granted... but you got the helpers... and I really think they look bad.. there must be a better way!
CodeMonkey