For the "run at server" tags the attribute ID has a different connotation than usual in HTML. ID is the name of the variable used in the code behind. If you want to get the ID of the tag as present on the client side do this:
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
var minCount = 1;
var maxCount = 500;
$("<%= TextBox1.ClientID %>").keypress(function () {
var strCount = $("<%= TextBox1.ClientID %>").val().length;
$("<%= TextBox3.ClientID %>").val(strCount);
});
});
</script>
<asp:TextBox ID="TextBox1" TextMode="MultiLine" Rows="25" Width="800" Height="100" runat="server"></asp:TextBox><br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
Regards,
— Manfred