I was wondering if anyone had an easy way to wire up javascript event handlers to events happening on the server-side. I have a long running process that includes a lot of steps, and would like the client to be continually updated with new information as the steps transition. Will this involve some sort of polling mechanism?
There are several server-side technologies that can be used when developing web applications. The most popular is Microsoft's ASP.NET. In ASP.NET, server-side code uses the . NET Framework and is written in languages like C# and VB.NET.
A client is the browser or application that your user interacts with. A client-side event usually comes in the form of a tag and is sent directly from the client to Indicative or a tag manager (like Google Tag Manager). These tags are sent when an event like page view or button click is fired.
Application_BeginRequest: This occurs at the beginning of each request to the server.
Blazor lets you use all your C# knowledge to apply in client-side development. Blazor replaces JavaScript code with C#. Essentially, it means that rather than writing the Client-side code in Angular, React, Vue using JavaScript and TypeScript, you can use C# and Razor.
Send an AJAX or JSON request from the client every so often asking for status.xml
. Then, on the server, when something changes, just quickly write a new line to status.xml
the same way you would to the console. You can use setInterval( function, timeBetweenRuns )
in Javascript to do this regularly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With