title: jQuery document.ready + Asp.Net ContentPlaceholder cause Visual Studio intellisence problems
body: <p>I want to execute JavaScript when document is ready without much syntax overhead. The idea is to use <code>Site.Master</code> and <code>ContentPlaceholder</code>:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          &lt;asp:ContentPlaceHolder ID="OnReadyScript" runat="server" /&gt;
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and in inherited pages just write plain code:</p>
  
  <pre><code>&lt;asp:Content ID="Content3" ContentPlaceHolderID="OnReadyScript" runat="server"&gt;
      $("#Login").focus();
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>It works fine but Visual Studio complains and gives warnings.</p>
  
  <p>Warning in master page is <code>Expected expression</code> at the line <code>&lt;asp:ContentPlaceHolder</code>.</p>
  
  <p>In inherited pages warning is <code>Could not find 'OnReadyScript' in the current master page or pages.</code></p>
  
  <p>I tried using <code>Writer.Write</code> in master page to render <code>script</code> tag and wrapping code:</p>
  
  <pre><code>&lt;% Writer.Write(@"&lt;script type=""text/javascript""&gt;$(document).ready(function () {"); %&gt;
  &lt;asp:ContentPlaceHolder ID="OnReadyScrit" runat="server" /&gt;
  &lt;% Writer.Write(@"});"); %&gt;
  </code></pre>
  
  <p>but page rendering terminates after opening script tag is rendered. Html basically ends with</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  </code></pre>
  
  <p>How can I make it work?</p>