Hacker News new | ask | show | jobs
by Riverheart 698 days ago
Instead of sending json to an api, form submission does a post back to the form page which detects this and reads the contents of form to do work on it. HTML pages can have code associated with them to do this in a cshtml file (C# specific). Lots of older frameworks support this, PHP being a popular example. Razor replaced ASP.Net webforms which has also been around forever.

See https://learn.microsoft.com/en-us/aspnet/web-pages/overview/...

2 comments

Which is a good summary, but in this specific circumstance the confusion of the developers wasn't about Razor pages, but the very concept of a "HTML" page having any interactivity of any kind without JavaScript and an API endpoint.

There is a very substantial fraction of developers who have never done anything else, and are completely unaware that such thing is even possible.

Ah postback. I probably missed the point of this thread then as I am not considering that to be an SPA. Or is this about it not being an SPA?