jQuery reset count on key press after partial postback
<p>I have a <code>TextBox</code> inside an asp.net <code>UpdatePanel</code> that records the number of key presses with some jquery</p>

<pre><code>$(document).on("keypress", "#TextBox",function()   {
    $("#KeyPressCount").val(i += 1);
});
</code></pre>

<p>I do a partial postback after a button click inside the UpdatePanel and the jquery re-binds as expected and continues counting the key presses.</p>

<p>Now if I wanted to reset the count after the partial postback how would I go about doing that?</p>

<p>So if it had counted 20 key presses then a postback occurred it would reset to 0 and start counting again.</p>

<p>Any advice is appreciated.</p>
