TOAST OF DC: President Obama and Mexican First Lady Margarita Zavala raise a glass as President Felipe Calderon offers a toast last night at the state dinner. Photo: AP

A dapper President Obama and his glamorous missus hosted a state dinner last night honoring their Mexican counterparts — a star-studded affair attended by a who who’s of Hispanic Americans, including Jet quarterback Mark Sanchez and Eva Longoria Parker.

Obama, with First Lady Michelle at his side, cracked a joke while walking into the White House festivities that drew chuckles from Mexican President Felipe Calderon and his wife, Margarita Zavala, who was decked out in a magenta sleeveless dress with an Aztec-inspired design.

Addressing the crowd at the dinner later, Obama spoke warmly of the “bonds we share as neighbors and friends. We celebrate the partnership between our two countries.”

He then addressed Calderon directly, “Mr. President, I must say it again: In the fight for your country’s future, you’ve shown extraordinary courage, extraordinary bravery, and you and the Mexican people have a full and committed partner in the United States.”

Calderon, in turn, praised the US-Mexican relationship, and said Americans are lucky to have a leader like Obama.

The state dinner was Obama’s second since taking office. His first, which honored the Indian prime minister six months ago, became a public-relations disaster after two DC social climbers — the now infamous Tareq and Michaele Salahi — snookered their way into the event.

The embarrassing incident prompted tightened security at last night’s swank soiree. Unlike the first state dinner, a rep from the social secretary’s office was at the entrance — alongside members of the Secret Service — checking the names of every guest.

At least one woman was turned away for not having a proper ID.

Kathryne Mudge said her husband, Assistant Secretary of State Arturo Valenzuela, forgot to bring it.

“We tried to be extra careful, but my husband is the absent-minded professor,” Mudge said. She got in an hour later after producing her proper credentials.

Some 200 guests were on the invite list, including a bevy of boldface names like Whoopi Goldberg, Secretary of State Hillary Rodham Clinton — minus hubby Bill — and LA Mayor Antonio Villaraigosa.

Sanchez — who is of Mexican descent — brought a date to the dinner, but it wasn’t sexy gal pal Jamie-Lynn Sigler.

The loyal gridiron star instead invited teammate D’Brickashaw Ferguson, his left tackle. They wore matching “Jets” pins on their lapels.

Comic George Lopez joked, “I’m sitting with the president. They didn’t tell me which country.”

In one of the night’s oddest pairings, single Newark Mayor Corey Booker brought Gayle King, Oprah’s BFF. “We’re really good friends,” he said.

While many of the guests were clad in designer labels, the modest champion said his mint-colored tie and cummerbund came from bargain emporium Men’s Wearhouse.

Longoria Parker, the “Desperate Housewives” star of Mexican descent, used the high-profile event to bring up the touchy subject of immigration.

Referencing Arizona’s tough new law on immigrants, she said, “You can’t have these states doing their own punitive laws.”

Celebrity Chicago chef Rick Bayless — a favorite of the Obamas for his gourmet dishes — prepared last night’s menu, which included Mexican dishes.

After the formal dinner, Obama invited the guests to enjoy entertainment in a tent on the South Lawn, where the Mexican duo Rodrigo y Gabriela played along with “someone you might have heard of,” the president said: Beyoncé.

“We were in a very formal dinner, but I heard that this was the place for the real party,” he said.