call c# function from .aspx page code example
Example 1: how to write function in aspx page
public void CheckCharCounter(string text)
{
}
Example 2: how to write function in aspx page
<asp:TextBox ID="TextBox1" runat="server" onkeyup="<%=CheckCharCounter(this))%>" />