Nanowires and nanotubes were synthesized from metals and metal oxides using templated cathodic electrodeposition. With templated electrodeposition, small structures are electrodeposited using a template that is the inverse of the final desired shape. Dielectrophoresis was used for the alignment of the as-formed nanowires and nanotubes between prepatterned electrodes. For reproducible nanowire alignment, a universal set of dielectrophoresis parameters to align any arbitrary nanowire material was determined. The parameters include peak-to-peak potential and frequency, thickness of the silicon oxide layer, grounding of the silicon substrate, and nature of the solvent medium used. It involves applying a field with a frequency >10(5) Hz, an insulating silicon oxide layer with a thickness of 2.5 mu m or more, grounding of the underlying silicon substrate, and the use of a solvent medium with a low dielectric constant. In our experiments, we obtained good results by using a peak-to-peak potential of 2.1 V at a frequency of 1.2 x 10(5) Hz. Furthermore, an indirect alignment technique is proposed that prevents short circuiting of nanowires after contacting both electrodes. After alignment, a considerably lower resistivity was found for ZnO nanowires made by templated electrodeposition (2.2-3.4 x 10(-3) Omega m) compared to ZnO nanorods synthesized by electrodeposition (10 Omega m) or molecular beam epitaxy (MBE) (500 Omega m). (C) 2010 Elsevier Inc. All rights reserved.