Website in pure C #

I want to learn how to make a website with C #. I know PHP, but I like C # better. I tried to learn how to create a website in ASP.NET, which so far has really disappointed me because I really don't like ASP at all (even less than what I like PHP). Something about it drives me crazy to the point that it’s hard for me to force myself to study it. Is there a way to immediately transfer control from ASP to C # and then do everything with C #, including the output of HTML and other materials when necessary, as in PHP? In other words, I like the PHP way of programming on the site, but I prefer the C # language. Any help would be appreciated.

+3
source share
8 answers

Take a look at asp.net mvc: http://www.asp.net/mvc/ .

This is much closer to metal than asp.net web forms, and should feel more comfortable if you come from PHP background.

There are many good tutorials here: http://www.asp.net/Learn/mvc/

+11
source

Yes, you can use HttpHanders to handle all of your requests. HttpHandler is a class that can directly receive a request and handle everything with code. It is often used to catch an image request and serve it for a database, but you can certainly use it to accomplish what you want.

MSDN HttpHandlers. , , .

ASP.NET MVC - , - ASPX . , . . ( - !)

: , HttpHandlers ASP.NET, , Request/Response/Server Context/etc Framework. 100% #.

+6

, ASPX ( <% % > ), , PHP ( ASP)... HttpHandler, HTML; Response.Write, ...

, , ;)

+4

Generic Handlers (.ashx). httpcontext, , .

+2

" ASP ( , PHP)", " PHP-". , , .

, asp asp.net, asp.net . , "" . , asp.net MVC. , Asp.net.

+2

ASP.net, #. ASP.net, , , . , ASP.net # (, vb - !).

html . , , , , . , - , .

, ASP.net , . , , , , .

+2

ASP.NET MVC : www.asp.net/mvc

+1

This is not a good option, but you can use C # with CGI if you want to go the easy way.

+1
source

Source: https://habr.com/ru/post/1717480/


All Articles