Bob Mayes was gardening in his Northeast Baltimore front yard this week when Attorney General Douglas F. Gansler launched himself down Berkshire Road, crisscrossing the block at a full-out run.

"Nice to see you! Thank you!" Gansler bellowed to one of Mayes' neighbors as he dashed to knock on the door of yet another potential voter in the Democratic primary for governor.

Gansler leaped up Mayes' steps to say hello and hand the retiree a glossy pamphlet about the campaign before taking off for another door.

"You wonder how many people you can reach that way," said Mayes, 70, as he watched Gansler move down the block. "Today, with social media and television ads, you'd think this wouldn't be necessary. Then again, if you're the one who gets the handshake, it matters a lot."

Despite their television-driven campaigns, enhanced by social media and digital advertising sophisticated enough to target voters by IP address, the politicians vying to become Maryland's next governor still rely heavily on old-fashioned retail politicking.

Among the Democrats sprinting toward the June 24 primary, Gansler knocks on doors, Lt. Gov. Anthony G. Brown attends house parties and Del. Heather Mizeur convenes "weekends of action" to do public-service projects.

Republican candidates are hitting the pavement, too, courting voters one at a time. Larry Hogan, for example, goes door to door among businesses, chatting up owners. Harford County Executive David R. Craig door-knocks wherever and whenever he can, says his running mate, Del. Jeannie Haddaway.

Right now, a time when most candidates aren't on the phone begging for dollars or hobnobbing at fundraisers because Maryland prohibits state legislators and elected official holding statewide office from raising money during the General Assembly session, candidates are relying on one-on-one interactions that policy experts say are inefficient ways to win votes.

"It's effective with the people who you meet, but that's a very small number of the potential electorate," said John T. Willis, a political science professor at the University of Baltimore. "There's no way a statewide candidate can get to a sufficient number of voters that way. It's a problem of math."

David A. Schultz, who has edited an anthology about the role of advertising in campaigns, said that with social media, volunteers and enough money for advertising, it's theoretically possible candidates in big races could eventually dispense with the one-on-one politicking altogether.

"Ten or 15 years from now, people may not do much of this at all," said Schultz, an adjunct professor at Hamline University School of Law in Minnesota, though he doubts many politicians would abandon what's often their favorite part of campaigning.

"It's what a lot of politicians came up with. … This is how they earned their first political victory," Schultz said. "Clearly, you couldn't have a campaign that's entirely electronic. But we're getting closer to that point."

Gansler and his chief rival, Brown, the two best-funded candidates in the race for governor, began the onslaught of television campaign ads this month. But like the less-moneyed candidates of both parties, they also employ tactics frequently reserved for local contests.

Gansler planned to spend more than 20 hours knocking on doors during the two weeks leading up to April 7, when the General Assembly session ends and with it the fundraising ban.

"People appreciate you coming to their door," he said while canvassing in the city's Arcadia neighborhood. "To have one-on-one contact with voters, to me, makes eminent sense. No one has told me what I can do better with my time between 3:30 and 6:30 on a Thursday."

Earlier in the day, the two-term attorney general was in a suit in his Baltimore office, debating with top aides how the state should best deal with the complex legal problem of overhauling its bail system. In the afternoon, he was in khakis and running shoes at a Baltimore sports bar, telling his team of canvassers they're inching closer to victory with each door knock.

"Even if you don't think you got their vote, you did, because we're the only ones who are doing this," Gansler said.

Brown, meanwhile, has held an average of three house parties a week since the beginning of the year. At each, he chats and shakes hands with small groups of potential supporters, and then gives a brief speech. Four more are planned before the end of this week.

"There's got to be some reality and grounding to a campaign," Brown's pollster, Fred Yang. said Wednesday night while the candidate mingled with about 75 people at a Chevy Chase house party. "These events are like spring training for candidates. You hone your message. You can see how people react."

Maha Sartip, a 39-year-old mother of two from Bethesda, said she considered herself a Brown supporter after hearing him tell the story of his immigrant parents coming to the United States. "On paper, I liked him. I wanted to see him in person, and that did it for me," she said.