Response to comments about the white/neutral/illegal etc. for controlling an outlet with a switch. This is often used to serve a disposal (the best solution for a disposal installation is to use a product called an airswitch. You may have seen them, the button is then in the corner of the sink in a knockout and matches the finish of your sink). I am an electrical contractor with 20 yrs experience, feel free to heck NEC for confirmation. While it is good practice to label white wires that are used as an ungrounded conductor (make them a "hot wire"), it would hardly be the most egregious error a homeowner could make. It is however in the NEC to label it for use as such: Article 200.7(C)(1) (painting, taping, or other manner for identification).
The best wiring method in my opinion for a switched outlet also depends on how the wires are run to each box.
Scenario one feeds the switch first and then goes to the outlet. Scenario 2 wires runs to the outlet first and then to the switch.
Scenario 1: pretty straight forward here. At switch white neutral wires go together with a wire nut, ground wires also get their own wire nut (pigtail wire from wirenut to the green screw of the switch). Black wires get their own screw (does not matter which wire goes to which black screw). The outlet is then wired as usual. White wire to silver screw, black wire to colored screw, bare wire to green screw. You cannot wire for a "Half hot" with this method, there are not enough conductors.
Option A (entire outlet responds to switch): in Receptacle box connect the line hot (black wire coming from panel) to the white wire that goes to switch (mark as mentioned above). Then connect the black wire that comes from the switch to either colored screw on the outlet. Finally connect the "line neutral" (white wire from the panel) to the silver screw on the receptacle). Bare copper wires together with a wirenut with pigtail wire to green screw.
At the switch white wire goes to one screw (mark as discussed), the black goes to the other screw. Bare copper wire goes to green screw.
Option B (half hot): At receptacle box, with pliers or cutters remove the metal tab that bridges the top screw with the bottom (do not do this with the neutral side of the outlet). Then connect the line neutral (white wire from panel) to either silver screw, next tie the line hot (from label) with the white wire going to the switch with a wirenut. In this same wirenut run a "pigtail" (short black wire) to one of the colored screws. Finally attach the white wire from the switch to the other colored screw (label appropriately). Bare copper wires together with wirenut and bare pigtail wire to green screw.
At the switch (same as before) white wire goes to one screw (mark as discussed), the black goes to the other screw. Bare copper wire goes to green screw.
This method ensures that at the outlet you have a black wire and a white wire connected to the receptacle rather than two white wires or two black wires. (can cause confusion for the lay person).
One of your receptacles will be always hot, the other will be controlled by the switch.
*under no circumstance should you use the bare copper (ground) wire for a neutral or hot. The ground wire is not intended to be a current carrying conductor, and with the adoption of new NEC codes requiring AFCI breakers for almost all circuits in a residence the breaker to continually trip. These breakers sense these disagreements and will break the circuit. It can be costly to have an electrician track this down later if you don't know where it is.
Now congratulate yourself with a beer.
Someone else asked what the purpose of breaking the tab between the silver screws might be used for. If f you need a dedicated circuit for 2 devices and only have a single gang box (one device), break both sets of tabs, connect both blacks to different colored screws, and the whites to the silver screws (make sure the black and white from one cable go to the bottom receptacle and the other pair go to the other outlet. *note that if you mix them up you may not realize it if they are controlled by standard breakers. They will only trip under specific circumstances. So make sure you pair the wires appropriately. With the AFCI breakers I mentioned earlier, they will immediately trip and not reset until rectified.
*it bears mentioning that new code requires that disposal and dishwasher circuits be GFCI protected. You cannot separate the receptacles for a "half hot" and remain compliant. It is common practice to have a 2gang box with a GFCI Receptacle for both appliances.
Have fun everyone. This is not meant in a condescending manner, i only intend to offer help.