I would like to install pipe parallel to the floor joists in my basement, and then conceal it behind drywall.

I need to do this with both gas (black iron) and domestic water (copper) pipe.

I'm tempted to use simple copper straps to affix the pipes to the joists themselves. Is this code-compliant? (The fact that this answer is so hard to find online suggests that it may be this simple.)

I've also seen pipes suspended between joists with a wood support--is it better to hang the pipe from a wooden support which is attached to the joist, to prevent rust from contact with the wood? (I've seen this elsewhere in my 100-year-old house.)

What is the standard, code-compliant way to support a pipe run parallel to floor joists?