Possible to use an ASP.NET control value in a Javascript file used in a Web Part?
<p>When you are coding in an aspx page you can do something like this:</p>

<pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
        var chkEnable = $get("&lt;%= chkEnable.ClientID %&gt;");
        alert(chkEnable);
      });
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;form runat="server"&gt;
      &lt;asp:CheckBox ID="chkEnable" runat="server" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>But the only way I have found to use javascript in a web part is to use a ScriptLink that imports the file.  Example:</p>

<pre><code>&lt;SharePoint:ScriptLink ID="ScriptLink5" runat="server" Name="myPorject/js/myCustomScript.js" Localizable="false" LoadAfterUI="true"/&gt;
&lt;asp:CheckBox ID="chkEnable" runat="server" /&gt;
</code></pre>

<p>Is there any way that I could reproduce the functionality from my first example in a web part?  Anything that I do must be able to be <strong>installed entirely through a wsp</strong> onto a system that I have no other access to.  Any solution must be implemented entirely through the wsp.</p>
