Recently, I came across Microsoft's Blazor, a tool that enables running C# code in the browser. After checking out some tutorials, it appears that an ASP.NET Core backend server is required for it to function properly. It would be interesting if we could directly input C# code in the browser like:
<script>
//C# code
string myName = "John";
alert(myName);
</script>
instead of
<script>
//Javascript code
var myName = "John";
alert(myName);
</script>
Is there a way to achieve this?