Question: I want to use jQuery in my ASP.NET 3.5 website that uses master pages and content pages. How do I do document ready() functions for the child pages for those that will use jQuery ? Where do I put the code?

I figured the jQuery declarations should go in the master page, but don't know how to make sure any jQuery calls go into the HEAD of the resolved page.

Answer: 
Just put a content placeholder in the master's head section, and then write page-specific scripts withing the asp:Content tags of your pages.

**Master**

```
<%@ Master Language="C#" %>
<html>
    <head>
        <script type="text/javascript" src="scripts/jquery-1.4.3.js"></script>
        <asp:contentplaceholder id="LocalScripts" runat="server" />
    </head>
    <body>
    </body>
</html>

```

**Page**

```
<%@ Page Language="C#" MasterPageFile="~/Master1.master" 
         AutoEventWireup="true" Title="MyTitle"  %>
<asp:Content ID="Content1" Runat="Server" ContentPlaceHolderID="LocalScripts" >
    <script type="text/javascript"> 
        $(document).ready(function () {
           // some local script logic here
        });
    </script>
</asp:Content>

```
`$(document).ready()` calls can be made anywhere on the page, not just in the head. If you do want your child pages to place additional scripts in the head area I'd suggest simply defining another ContentArea in your master page inside the head tags.