...
Answer for your First Question - Differences between PHP and ASP?
As a programmer who uses both languages, here is in a nutshell:
Syntax:
ASP is a Microsoft product based on the very ackward Visual Basic syntax
(Example: If / End If).
PHP is a C-Like, very compact and well organized. Some ackwardness, but it
makes it more romantic
Hosting:
ASP works better on Microsoft servers. There is a possibility to run ASP on
Linux and BSD but I would not recommend, because of the fact that ASP relies
a lot on external components that often come in the form of DLLs that you
need to physically register on the server.
PHP works fine on both environments but a Linux/BSD server will run your
scripts faster than a Windows box because of the overhead (or lack thereof).
Out the box solutions:
Both languages are popular but PHP for some reason has more Open License
solutions that you can implement for free or for a donation if you are a
good guy (usually if your project makes you richer, you are supposed to give
back).
Toolbox:
PHP can be easily installed with a very large number of tools such as image
manipulation, upload, email, etc...
ASP requires the registration of components to do that and very ackward
object declarations. Most of these components are not free.
Speed:
ASP is very slow. Darn slow. Not suitable for traffics of thousands a day.
Many ASP Web sites evolved towards either PHP or Dot Net when they became
popular.
PHP is way faster. Dot Net (ASPx) is now faster but really not popular.
Database connectivity:
ASP works better with SQL Server and Access. I have not used it with MySQL,
because it does not make sense.
PHP works very very well with MySQL (PostGreSQL as well, but I know nobody
who uses it). It works fine with SQL Server and Access if you really really
want to use these database systems, but Access is slow. SQL Server is
costly.
Simply put:
If you have to use a Microsoft server, then use ASP/SQL Server.
If you have to use a Linux or BSD Server (or anything Unix), then use
PHP/MySQL.
Answer to your second question - Differences between ASP and ASP.NET?
Process Isolation:
ASP is run under the inetinfo.exe(IIS) process space and hence susceptible to application crashes as a result the IIS needs to be stopped or restarted. ASP is related to the process isolation setting in IIS.
But, ASP.Net
The ASP.NET worker process is a distinct worker process, aspnet_wp.exe, separate from inetinfo.exe ( IIS process), and the process model in ASP.NET is unrelated to process isolation settings in IIS.
Non-MS Platform Support:
Classical ASP had no mechanism of running itself on non- Microsoft technology platforms like the 'The Apache Web Server'
Multi Language Support in WebPage
In ASP only two languages were available for scripting VBScript and Jscript/Javascript.
But in ASP.NET
We are no longer constrained to the two scripting languages available in traditional ASP: Any fully compliant .NET language can now be used with ASP.NET, including C# and VB.NET.
But, ASP.NET
ASP.NET could be run on non-Microsoft Platforms also. Cassini is a sample Web server produced by Microsoft which, among other projects, has been used to host ASP.NET with Apache.
Many more
Answer to your 3rd Question : PHP, ASP or ASP.NET which is best?
ASP 3.0 from what I remember was harder to maintain. I will never develop in it again.
PHP 4.0 was pretty easy to learn and use. It was still an interpreted language. It took me a long time to develop anything in it though. Hosting is very extremely cheap.
ASP.Net is amazing. I love that it is compiled and object oriented which (if done correctly) can be very easy to maintain. Hosting was expensive at first, but prices have come down a lot. Some hosting is as cheap as PHP hosting now.
I hope I have given best answers for your questions