It's simple you are missing static
And the reason it supports only static methods is that
page is instantiation is not done, if you want to use non static web methods then go for web service(.asmx).
Collapse | Copy Code
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string[] GetArea(string prefixText, int count)
So any web method of backend you want to use from fronted that may be ajax, jquery...
It needs a static web method
Get more info
static-webmethod-in-code-behind-webform/[
^]