Crosslinking before of after foaming