Crosslinking of copolymers containing N,N‐dimethylacrylamide