Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I wrote engineering equations and basic on C# as WPF applications. however, I wrote the program as classes .dll and the GUI WPF app.
Time has changed, so I want to change my WPF app to a web app or a single page app. the GUI not a problem but the main thing is to use the ".dll" libraries as a server-side and not need to write it over again.
My question is what to use for building the App, with the same C# libraries, can it done with typescript and react and do need python in the server side?

What I have tried:

I am working on visual studio and based on .net Core the newest one, also I write python on VS. not sure if I can use Typescript on VS
Posted
Updated 23-Nov-20 18:12pm

1 solution

You would need to expose an endpoint on your server which would accept the relevant inputs, perform the calculation, and return the results. You would access that from Javascript by making an AJAX request.
Getting Started - Developer guides | MDN[^]

For modern browsers, the Fetch API may be easier:
Fetch API - Web APIs | MDN[^]

Alternatively, you could use Blazor to run your C# code on the client:
Blazor | Build client web apps with C# | .NET[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900