My baseline ASP.Net MVC modifications

time to read 1 min | 138 words

We start by killing ViewData. I don't want it, and I want to fail hard if someone is trying to use it:

image

Likewise in the views, I hate ViewData.Model, so I remove it from there as well:

image

For Javascript, I don't want to use <script/> tags, they are prone to path problems, and I might need to go back and change them (using compression, combining scripts, etc). I use this approach:

image

The page title is set by the view, the way it should:

image

Or, I just set it up in the master page, if I don't care that much about changing it.