I have discovered the error! The top line of Default.aspx should be
<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="FileDownloadExample._Default" %>
I was missing the Inherits attribute (I guess this is like the use statment in php?) and CodeBehind should be CodeFile, why? I have no idea, but id definitely like to understand it