1

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 ?

3 Answers 3

1

I found the Spark view engine cleans thing up.

http://sparkviewengine.com/

Sign up to request clarification or add additional context in comments.

1 Comment

Spark looks really nice! :) I just stumbled over NHalm myself... have a look at it :-)
0

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).

Comments

0

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.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.