I don't think this is a good idea.
Questions should really stand on their own without requiring those who wish to answer clicking on links which take them to other pages, let alone other sites.
For code in questions post the minimum code that demonstrates the problem. This doesn't have to be a complete working example, but enough that people can paste into an empty project (of whatever flavour) and see the problem reproduce. You never know, in reducing the code this way you might even solve your own problem.
Similarly code in answers should be enough to demonstrate the solution.
There's nothing to stop you posting a link to the complete solution as shortcut for people, but it should only ever be as a backup or reference for your question or answer.