public void CheckCharCounter(string text) { }
<asp:TextBox ID="TextBox1" runat="server" onkeyup="<%=CheckCharCounter(this))%>" />