title: Insert Javascript into content page in ASP.NET without compiling it
body: <p>I have an <strong>ASP.NET Web Forms</strong> application in <strong>VB.NET</strong></p>
  
  <p>In my application I use a <code>Master Page</code> and to insert <strong>Javascript</strong> for a specific page I use a <code>ContentPlaceHolder</code>.</p>
  
  <p>I have a <strong>Javascript</strong> where I use code nuggets and I inserted in my page like this:</p>
  
  <pre><code>&lt;asp:Content ID="Content4" ContentPlaceHolderID="javascript" runat="server"&gt;
  
  &lt;script language="javascript" type="text/javascript" &gt;
  
  function showErrors() {
        var id = '&lt;%=Request.QueryString("id") %&gt;';
        &lt;%if (Request.QueryString("errors") == "true")  {%&gt;
            var errorCode = '&lt;%=Request.QueryString["errorCode"] %&gt;';
            var errorMessage = '&lt;%=Request.QueryString["errorMessage"] %&gt;';
  &lt;%} %&gt;
      }
  &lt;/script&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>The problem is that when I build the solution, also the <strong>Javascript</strong> code gets compiled and of course syntax errors are found. For instance one of the build errors is related to the <code>if</code> statement that does not have a matching <code>End If</code> (as it is supposed to be in VB.NET)</p>
  
  <p>How can I make the compiler understand that it has to skip the <strong>Javascript</strong>?</p>