When I build my ASP.NET web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, an
You can Publish Web site..If you want to automate your deployment, you need to use some script.
For the automated building you describe in the update, I would recommend you look into MSBuild and CruiseControl.NET
Have you tried right clicking the website in Solution Explorer and clicking 'Publish Website'?
Have you tried using the aspnet_compiler.exe in your .net framework directory? I'm pretty sure you can create a "deploy ready" version of a web application or web site.
One solution appears to be Web Deployment Projects (WDPs), an add-on for Visual Studio (and msbuild) available that builds a web project to a directory and can optionally merge assemblies and alter the web.config file. The output of building a WDP is all the files necessary to deploy the site in one directory.
More information about Web Deployment Projects:
The only disadvantage to this solution is the requirement on an add-on which must be available on the build machine. Still, it's good enough for now!
Build --> Publish
A dialog box will appear that will guide you through the process.