I am quite new to asp.net core development and I really don't know much of javascript, I am trying to know if there is some way to handle input events like OnClick() or OnChange() of Html inputs using only C#/Razor code without a form too and using only Razor Pages/MVC , Something Like this:
@{
void RazorFunction()
{
//Do Stuff
}
}
<button Onclick="RazorFunction"/>