Yes we can put are aspx file any anywhere. It is not at all mandatory to have are aspx page on the filesystem but to register any such other medium you have to implement a logic by deriving a VirtualPathProvider class and registering it Application_Start event.
There is also an article available on microsoft website describing the same just go through it
Overview of the article
Article discuss about how to extend ASP.NET by providing virtual access to content and files for compilation in ASP.NET 2.0. This feature can be used to create applications similar to Microsoft SharePoint Portal Server, where the content is stored in a database instead of on the physical file system. In this article, we will build a sample where the content of the requested Web form page is stored in a Microsoft SQL Server database.