title: JQuery in ASP.Net User Control in C#
body: <p>I'm having problems using JQuery inside an ASP.Net User Control  I've created a sample and here is the markup for my user control:</p>
  
  <pre><code>&lt;%@ Control Language="C#" ClassName="UC" AutoEventWireup="true" 
      CodeFile="UC.ascx.cs" Inherits="UserControls_UC" %&gt;
  
  &lt;span id="Licenses"&gt;&lt;/span&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          var ctlID = $("span[id$='Licenses']");
          ctlID.text = "Testing";
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>If I include this script tag <code>&lt;script type="text/javascript" src="js/jquery-1.3.2.js" /&gt;</code> in the aspx file containing the user control to reference JQuery, nothing happens. If I don't include it, I get a JavaScript error dialog saying there was a runtime error and that an Object was expected.  Any ideas what I may be doing wrong?</p>