Setting an ASP Label control with text from JQuery
<p>I'm new to JQuery and I'm writing code to check a registration form.  Here's my label in the server page:</p>

<pre><code>&lt;asp:Label ID="LabelErrorFirstName" runat="server" ForeColor="Red" Font-Size="Small"&gt;&lt;/asp:Label&gt;
</code></pre>

<p>and my JQuery script:</p>

<pre><code>if(firstnameTxt.length == '') {
      $('#&lt;%= LabelErrorFirstName.ClientID %&gt;').text("Please enter a first name.");

  }  
</code></pre>

<p>I access this script from the OnClientClick event in a button on the form which I know works i.e. I set alerts here which shows it's getting there.  I've commented out the 'if' statement in case that was the problem but it isn't.</p>

<p>What I want to happen is to have this label's text property set if the first name textbox is empty to "Please enter.." etc. I've tried many variations but I can't get it.</p>

<p>What am I missing?</p>

<p>Paul</p>
