Saud Alomari

Saud Alomari

  • NA
  • 2
  • 572

How to run my c# code in a webpage?

Oct 10 2022 11:24 AM

Hi devs,

im an amatuer programmer that works good enough with offline c# applications like Windows Forms, and please forgive me for my humble knowledge.

ive developed a WinForm that has users and special access for certain data and runs calculations and analysis 
for imported data.

i send an encrypted text file to users so they can import it to the program to update users data and such.

my problem now is that its not effecient to run this program offline, and making it online will have greater benefits.

so im asking you devs to kindly give me a direction to the idea i want which is:
    - i want a webpage that gets the users input.
    - i want this webpage to communicate with my c# code (send inputs to c# code and gets output from c# code to show to user).

here is an example of the process:
    *webpage*
    - gets username from user.
    - gets password from user.
    - user clicks sign in.
    - webpage sends username and password inputed by user to c# code
    *csharpcode*
    - gets inputs from webpage.
    - search for inputs in users list.
    - sends results to webpage.
    *webpage*
    - gets results from c# code and logs user in.
    - gets input int A from user.
    - gets input int B from user.
    - sends input to c# code.
    *csharpcode*
    - gets input from webpage.
    - calculate C = A + B. (just to show you that i want to do the calculations and analysis in c# code)
    - sends C to webpage.
    *webpage*
    - gets results from c# code and show C value.

i hope you can guide me to a way to make this possible, note that i really want to use my c# code since it has a lot of work done and cant easily be translated to other languages.

Thank you in advance.


Answers (1)