President Barack Obama on Monday carried his job-creation crusade into the heart of Silicon Valley, a corner of the country that has done pretty well at job creation on its own.

At a town-hall meeting with social-media powerhouse LinkedIn dubbed "Putting America Back to Work," the president was relaxed and often jovial, using the event at the Computer History Museum in Mountain View as a bully pulpit for his $447 billion plan to create 1.9 million jobs renovating the nation's roads, airports and railways.

Seeming just as pumped up as the crowd of LinkedIn members and guests, Obama started with some serious ego-stroking, saying every time he comes to Silicon Valley, "I am excited about America's future because no part of the country better represents the essence of America. If you've got a good idea and are willing to put in the blood, sweat and tears to make it happen, you can do it. That driving spirit has made America a superpower."

For the next hour, Obama fielded a half-dozen questions, some from the live audience and others submitted online. At times, he spent as much as 10 minutes on a single answer, particularly those on the need to make America's education system more globally competitive.

His message was clear: put people back to work now, but in coming years do what's necessary to ensure that America stays competitive. After stressing the need to get more teachers back into the classroom, Obama made another push for improving the nation's infrastructure, "putting people to work rebuilding our roads, and also making sure we're providing small businesses the kinds of tax incentives that will allow them to succeed."

Veering off his jobs message at times, Obama seemed especially focused on bolstering America's schools or else risk being left behind by China and India. And he said efforts to make our children smarter and better equipped for the global economy must start at home.

"We have to turn off the TV set and put away the video games sometimes and get our kids motivated by learning," the president said. "If we don't do that, we'll continue to slip behind."

Obama, whose plan depends on raising taxes on the wealthy, got a softball question from a man the president referred to as "that guy with glasses up in the back row." It turned out to be a former -- and now independently wealthy -- Google (GOOG) brand manager named Doug Edwards.

Edwards said, "I don't have a job but that's because I've been lucky enough to live in Silicon Valley and do quite well, so I'm unemployed by choice."

Then he asked: "Will you please raise my taxes? I would like you to invest in things like Pell grants and job-training programs that made it possible for me to get to where I am."

Obama ran with it, saying, "America succeeds in large part because of entrepreneurs, which is great."

But, he said, "We're successful because others have created great universities" and well-run government programs that help students learn, so "we've all benefitted from somebody somewhere helping us out."

Within an hour after the event, Obama was back aboard Air Force One, heading to more fundraisers in Southern California.

At a separate GOP event Monday, House Majority Leader Eric Cantor of Virginia, House Majority Whip Kevin McCarthy of Bakersfield and House Budget Committee Chairman Paul Ryan of Wisconsin visited Facebook's headquarters for their own town hall meeting.

Responding to questions from Chief Operating Officer Sheryl Sandberg, the audience and people who posted questions on Facebook, the three lawmakers played up their entrepreneurial past -- McCarthy talked about paying for his college education through a deli he started growing up in Bakersfield -- a message that seemed calculated to appeal in the valley.

Asked by a Facebook employee whether it makes sense to cut business taxes when many businesses are making record profits but are not hiring workers, Cantor said the private sector can do a better job of boosting the economy through job-creation than government can.

"I think Mark Zuckerberg and Sheryl Sandberg and the rest could allocate capital to create more jobs in California than Washington could," Cantor said.

Some of the attendees at the Obama town hall said they'd been selected after they submitted their profiles through LinkedIn emails and surveys.

Michelle Turpin, 44, of Seattle was among those picked. She also was put up at the Four Seasons hotel.

"This is surreal," Turpin said.

Turpin, who was laid off from two jobs recently, did not get the chance to ask the president to extend federal unemployment benefits.

Retired environmental scientist Christine Bailey, who had come from Sacramento to take part in the event, said, "He seems to personally carry the weight of this recession and the dismal jobs picture; you can see it in his body language that he really is taking this to heart."

Staff writers Lisa Fernandez and Mike Swift contributed to this story. Contact Patrick May at 408-920-5689 or follow him at patmaymerc on Twitter.