In ASP.NET you can use your code-behind (A.K.A C# classes) by putting them into a special ASP.NET folder, known as
App_Code. All of your logic, to describe the working of the objects in your application must be put their, if you're going to have any library (.dll files) then you must add it to the
bin folder.
Once there, you can easily call your objects into the aspx page, by adding a reference to the namespace of your project (if the namespace of class file and your ASP.NET project doesn't match) like this,
using MyClassFiles;
.. then, you can call the methods and property of them in your aspx page, as you would in any other application written in C#.
I would like to recommend, when you're working with ASP.NET you must try to ignore writing the business logic of your application (main code) inside the aspx page where you're going to render the HTML. Instead, you must create these objects in the code-behind and just call the functions and methods. Also, you must try to return only the string that would indicate success or error.