Reputation:
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:
any other suggestions ?
Upvotes: 1
Views: 228
Reputation: 1038710
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.
Upvotes: 0
Reputation: 1062510
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).
Upvotes: 0