As mentioned in Solution-1, Google is the wonderful source for searching. Really do not know why you need
HttpHandler to call your c#/code-behind method using
Javascript.
Instead you can simply use
Ajax to do this. Have a look at my Tip/Trick on this topic.
Simplifying Asp.Net Core Ajax
If you want to learn what is
HttpHandler and when should it be used, then have a look at below article.
The Two Interceptors: HttpModule and HttpHandlers