As described in Overview of Feature Development, all features should be implemented as a .ascx control that inherits from SiteModuleControl. This makes the part that can plug into a mojoportal content page. The only time to create ,aspx pages is for additional supporting pages outside of the content system.
For example, the Forums feature is a complex feature. It has ForumModule.ascx which is its SiteModuleControl. When you put a instance of the forum on a page it is really putting an instance of ForumModule.ascx on the page. But since forums is a complex feature, it can't all be implemented in this one control, so we have some supporting pages like ForumView.aspx, ForumThreadView.aspx, ForumPostEdit.aspx, etc.
The ForumModule.ascx must always pass the correct pageid and moduleid in the url when it creates links, this way we keep the context of the page where the fourm is located. So ForumModule.ascx has links to ForumView.aspx and ForumView.aspx has links to ForumThreadView.asp etc, and each link must pass the correct pageid and moduleid to keep things tied together correctly. Pages like ForumView.aspx and ForumThreadView.aspx are outside the content system, that is they are not linked into the menu at all. They are only linked from inside ForumModule.ascx
This is all covered in the developer documentation.
Best,
Joe