In my last refactoring post I demonstrated using the MVCContrib helper extension Html.ScriptInclude to help tidy up jscript files.
This time I'll show you a another MVCContrib helper Html.Stylesheet. As the name suggests it works in the same way as ScriptInclude but works for css stylesheets.
The key to this helper method is sticking with a convention of storing your css files in Content\Css:

Now in your master file use the following:
1: <head runat="server">
2: <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
3:
4: <%= Html.Stylesheet("Site.css") %>
5: <%= Html.Stylesheet("jquery.cluetip.css")%>
6:
7: <%= Html.ScriptInclude("Jquery-1.3.2.js") %>
8: <%= Html.ScriptInclude("Jquery-validate.js") %>
9: <%= Html.ScriptInclude("Jquery-metadata.js") %>
10: <%= Html.ScriptInclude("Jquery-cluetip.js") %>
11: <%= Html.ScriptInclude("Jquery-example.js") %>
12: <%= Html.ScriptInclude("jquery-ui-1.7.2.custom.min.js")%>
13: <%= Html.ScriptInclude("Form.Common.OnLoad.js") %>
14: <asp:ContentPlaceHolder ID="HeadContent" runat="server" />
15: </head>
Now that looks much better!
d7d1475f-0d17-4d89-9e72-3fe0667f5bdf|1|4.0