Reputation: 142
In regards to web development PHP works seamlessly embedded inside HTML pages and is parsed before the HTML itself (hence the name PHP!). I'm thinking of starting to learn ASP.NET and C# and it greatly boggles me how do these two Microsoft technologies work in tandem when compared to PHP which is a single entity in itself. I still can't understand how any logic written in C# files is tied to HTML pages that contain ASP.NET scripts.
And yes, if PHP is a scripting language, are C# and ASP.NET too server-side scripting languages??
Upvotes: 2
Views: 987
Reputation: 6901
I will explain in a rather unconventional way, but I think this makes it easier to explain and understand.
The C# code is compiled, usually one class per page. The ASP.NET part is compiled into a class derived from the C# class.
The web server calls some function in the class to start the create the page.
Simplified it works like this:
Refer to ASP.NET Page Life Cycle for more info.
Upvotes: 2