#Need a better understanding of ASP.NET
1 messages · Page 1 of 1 (latest)
Yes, ASP.NET uses JS (or TS) for frontend and C# for backend.
The way you do interaction between them, is using endpoints (in pages or controllers, based on your project setup; I suggest you look into that yourself).
Alternatively, I think you can use Blazor to write both front- and backend in C# (though you might be missing some features as Blazor transpiles C# code to JS).
Razor pages are also a possibility but isn't pushed all that much anymore.
@past lake do you have a source for Blazor transpiling to js? As far as I know it's either server side rendering or WebAssembly with JS interop, but that doesn't make it JS 
It might have been interop as well; the Blazor page has a heading entitled "JavaScript interop", but the information popup talks about js transpilation.
Alright! Thank you all
You can indeed use Blazor, but it does not transpile to JS
It compiles to WebAssembly
So it completely bypasses any interaction with JS (though you can have it communicate with JS and live side-by-side, but.... idk why you would really want that in most cases tbh)
So you can use C# for both front and backend. Just C# full stack the whole way. ASP.NET lets you do this
Well in the preview days of blazor (idk how it is now haven't really looked at it all anymore) there simply were a lot of things you couldn't do yet with C# so the interop was requried