[1] http://www.ftc.gov/bcp/edu/pubs/consumer/alerts/alt143.shtm
Just about the cheapest place to get an eye exam is in the Wal-Mart vision department, and they're happy to hand over the prescription. Of course, they run the vision dept in part to try to sell you lenses/frames (or contacts), but it's a very corporate/streamlined place, and the actual employee working there doesn't mind if you want the prescription to take elsewhere.
On the other end of the scale, places that look more like a doctor's office than a frames showroom tend to be pretty professional about it. Since I have very strong myopia with some risk of retinal problems as a result, I've been going to a place that's a partnership between an optometrist and an ophthalmologist (M.D.) who do a more thorough eye-health exam, and there it's basically expected that I'll want to take the prescription with me.
The optometrist's exam prices are probably lower than they would otherwise be because he makes some amount of profit on the sale of frames and lenses. If the model becomes: get a script and buy the frames online, then the prices for exams are going to eventually go up.
I'm about to find out what happens in UK!