How to change the class name based on the textbox value
<p>I have more textbox controls in my page and when the text is null the CSS or class should change, and when there is some text I need to change the current CSS or class. I am not getting the logic how to do this. My design code is like this:</p>

<pre><code> &lt;asp:TextBox ID="txtFirstName" runat="server" CssClass="field" Width="150px"&gt;&lt;/asp:TextBox&gt;
 &lt;asp:TextBox ID="txtLastName" runat="server" CssClass="field" Width="150px"&gt;&lt;/asp:TextBox&gt;
 &lt;asp:TextBox ID="txtemail" runat="server" CssClass="field" Width="150px"&gt;&lt;/asp:TextBox&gt;
 &lt;asp:TextBox ID="txtpassword" runat="server" CssClass="field" Width="150px"&gt;&lt;/asp:TextBox&gt;
 &lt;asp:TextBox ID="txtconfirmpassword" runat="server" CssClass="field" Width="150px"&gt;&lt;/asp:TextBox&gt;
</code></pre>
