Equivalents to "Controllers" in the .Net Framework

0

A few months ago I had an error and believe what a web page should be in ASP.Net Core as a class library. For several things that are used and for incompatibility, I have to pass it to .Net Framework (4.6.1 specifically).

I am aware that I have to redo almost all the code but, since I am new to this language / format, I am not sure where I should try to redo the part of the ASP.Net Core controller or how to call it. When you create it, VS automatically does it in a folder called "App_Code" but does it work the same as if it were a controller? Can I invoke it in the same way?

For post methods, for example, I call it from JQuery with AJAX as follows in ASP.Net Core:

$.post({
                    url: '/Home/Login',

...
});

My question is how to use that url: '/Home/Login', to call the corresponding function ... can it?

    
asked by Rabegi 04.04.2018 в 10:40
source

1 answer

0

I recommend you create a MVC project within the solution and use the class libraries of the other projects, or redo everything within the MVC project and create a folder for Business Logic / Data Access and move all your code.

It's an extensive topic and there are many ways to branch your project folders, but the fact is that you have to create an MVC project to be able to use Controllers (of course you could program your own version of drivers or use a library / framework that is not from Microsoft but would not be optimal).

Take a look at this.

link

I warn you, it is a long issue, it is not something that can be answered in a Stackoverflow question, but if you already have a notion about the design model Model Vista Controller maybe you do not have much war (I say this because you mention Controllers ).

If you have any questions, ask me and I can help you by Msg.

    
answered by 05.04.2018 в 04:29