I have been working for a long time with PHP, and tried to be as good as possible on it (good coding practices, knowing how every request is handled from the start to the end, etc.), but now, for job reasons I have to start learning ASP.NET and C#.
I've read and tried to understand it's foundations, as ASP.NET is always working with a given Framework called .NET, but there are so many versions, and different approaches like MVC or WebForms, etc.
I've made some tests, and I see that parts of the code get compiled, others not —don't know why—, and that a lot of shit is generated in the final HTML output.
I have the feeling of losing control over my WebApp, so my question is: Where can I start to understand how that works? Any tutorial, book, etc is welcome (as up-to-date as possible).
Is it possible to keep having control of the code with that Microsoft software, so the final output is clean, lightweight and high performance JS and HTML code?
For the C# part, I think this it is the easiest one, I'm just looking for a good book to read... I guess version 5.0. Am I right?