I have just created an ASP.NET C# project and a virtual directory for it in IIS in (as far as I know) the normal way, but I am seeing very strange behavior that I have never see
I suspect your Page declaration (<%@ Page ... %>) in the apsx file is wrong. Look at ClassName and CodeBehind attributes and make sure they match your .cs file.