The reason America has so many illegal immigrants is the same reason America (and any other country) has immigration. Same reason young Americans flee the Dakotas. Those places suck.
Building a fence between the US and Mexico won’t make Mexico suck less (or NoDak) – illegal workers sending money to their home country just might. US, European, and BRIC (Brazil, Russia, India, China) corporations opening satellite offices, training Mexicans, and making Mexico a cool place to be will.
What if the rest of the world took it upon themselves to improve Mexico. And they did. Sure it could take years. Decades. Decades that should be behind us.