This issue is NOT about a problem with the hyperlinks in the pages. They all work properly as long as they are server controls as you stated. The designer will show them in error that they don't exist though because I am including the module subdirectory in the path.
I have a web application project hosted via IIS virtual directory and application at localhost\mainsite\.
I also have a module that's ANOTHER web application project hosted as IIS virtual directory ( but NOT application ) at localhost\mainsite\core.
ALL of my user controls and pages are in core. Their hyperlinks work just fine whether I grab the master page template from locahost\mainsite\templates OR localhost\mainsite\core\templates. If I leave the MasterPageFile setting in my core pages as ~/templates/pages/main.master then I can edit the page in the designer and VS resolves ~ to the virtual directory for the core1 directory. When I RUN the app however, .net runtime is resolving ~ to the mainsite directory so I have to have my templates ALSO in locahost\mainsite\templates or .net throws an exception about the templates missing. The problem is this is WRONG as I'm going to switch the template in PreInit but the code doesn't get that far. It's verifying the MasterPageFile setting stored in the aspx page. Personally, I think that I should be setting my MasterPageFile setting to ~/core/templates/pages/main.master in my core aspx pages. But I can't since VS resolves ~ differently than at runtime.
So I basically have to remove the MasterPageFile setting from the aspx pages so that I can truly choose where I want to load the masterpagefile from at runtime. But then I loose designer editting.
There are basically two bugs here.
1) .net should not verify that the masterpagefile exists UNTIL AFTER preinit.
2) What should '~' resolve to for a nested website application project. I think VS is doing the wrong thing. ~ should resolve to localhost\mainsite in the core project. It should not include the core directory in the path since it's not an application. If anything, VS project settings should allow us to override what ~ resolves to at designtime.