If you MUST work with a recruiter (staffing firm, for example), I think it's important to be firm that you're excited for good opportunities, but that your salary history and expectations are your private business. I also recommend going around the recruiters whenever possible by using your own network (people who work at the company or in the industry who can make phone calls to put you in touch with the company directly).