Follow this programming pattern to connect the front end to the back end in an ASP.NET web application:
Create the Front End
The front end of an ASP.NET application is created using HTML, CSS, and even JavaScript in some cases.
Create the Back End
The back end of an ASP.NET application is created using C#, Visual Basic, or another .NET language.
Connect the Front and Back Ends
ASP.NET uses the Model-View-Controller (MVC) pattern to connect the front end with the back end. The MVC pattern uses a controller that serves as the middleman between the front end and back end, retrieving data from the back end and passing it to the front end. The controller also handles user input from the front end and passes it to the back end.