lessons learned or mistakes made when using asp.net mvc

asp.net-mvc

Solution

- Use Html.Encode() everywhere you print data, unless you have a very good reason to not do so, so you don't have to worry about XSS

- Don't hardcode routes into your views or javascripts - they're going to change at some point, use Url.Action() instead

- Don't be afraid of using partial views

- MVC is no silver bullet, first evaluate if it's indeed the best tool of choice for solving your problem.

Problem

what are your top lessons learned when starting asp.net mvc that you would highlight to someone starting out so they can avoid these mistakes?

Original source

Related problems