Q:

Where should I include a javascript reference for a view that inerhits from a Master view in ASP.NET MVC?

I have a bunch of pages inheriting from a master view.  One one of these pages I want to use a popular jQuery plugin called "Uploadify".  
Where should I place the reference for the Uploadify javascript file?  I only need it on one small page so it didn't seem right to place it in Master view.  Is it 'Ok' to place it in the content tag of my inherited view that will use this plugin?

A:

The best way I know to do this is to add a ContentPlaceHolder in the <head> section of the MasterPage, and add the <script> tags to a Content referencing that section in all pages that need extra javascripts (or stylehseets, or whatever... It certainly adds an extra degree of freedom).
In you master:
<head>
    <!-- Sitewide script references, title tags etc goes here -->

    <asp:ContentPlaceHolder ID="HeadContent" runat="server" />
</head>

As it is empty by default, you don't have to change anything in any other pages to make this change to your master.
In your page that needs the extra js script:
<asp:Content ID="HeadContentFromPage" ContentPlaceHolderId="HeadContent">
    <script type="text/javascript" src="myPageSpecificScript.js"></script>
</asp:Content>

