The two take different approaches to creating web pages.
In a PHP based solution you mix HTML and PHP together. A language processor then converts the HTML code into print statemends and the resulting pure-PHP is then executed to write out the HTML for the page.
ASP.NET can be used like PHP, because that is the way traditional web developers think. However the intended way is different.
In ASP.NET you design your page in an extended and extensible version of HTML. The page is then seen as an object model which is parsed, along the way calling into business logic.
For small scale development PHP has the advantage that is is well known and straightforward. You take your static HTML document and for dynamic content insert PHP wrapped in .
ASP.NET is designed for larger scale reusable development. You take your static HTML document and insert placeholders where the dynamic content will appear, these placeholders are then populated by the code behind. That code behind can be written in C#, Visual Basic or even SQL.
PHP therefore mixes HTML and code together and the two must be tested together. ASP.NET keeps HTML and code separate, which means the code can be tested in isolation and more easily reused elsewhere.