I am very new to ASP.Net and would like to try this technology, mostly because I am impressed with the performances so far.
I come from the PHP world where you can just include some PHP code into your HTML page and that will do the trick as long as the web server is able to give the page to the PHP processor. One page, one PHP script, this is the rule. (I'm leaving behind path info issues here...)
Now I am very confused about all the ASP.Net tutorials I read so far. ASP.Net seems to be working in many different ways and it looks like history often changed the "best way".
Here what I understood so far:
- You can embed you ASP code within your HTML page, this seems to be the old way, when .Net did not exist. While this looks ok for me PHP guy, I do not understand how I can share classes between pages.
- You can "partially define" (WTF?) the System.Web.UI.Page class and separate the ASP code from the HTML using some events and controls (did not really understand that one).
- You can create controls that you directly embed into your HTML that can be bound to external data, code is then completely separated from the HTML and has to be compiled separately (again, absolutely no clue about that).
Now keep in mind that I am using Mono with Mac OS X, so no Visual Studio, every "use-Visual-Studio-and-everything-is-done-for-you-automatically" answer will be down-voted, I want to actually type my code and understand what is going on under the hood. I want to be able to control what I send to the browser and how.
What would you recommend for a newbie like me to experiment with ASP.Net (using the C# language is that is relevant). Feel free to answer with a long formatted article, I really want an ASP.Net beginner tutorial for existing PHP developers.