Before politicians get Joseph D. Marks' vote, he likes to know where they stand. So after about an hour of listening to generalities from a dozen Montgomery County candidates at a noontime forum last week, Marks, a retired Navy Department employe and voting Democrat, had a question for State Sen. Howard A. Denis.

"I've seen your signs all over," Marks said. "Why don't you have your party affiliation on your signs?"

Denis, a 43-year-old Republican moderate known for his quick wit and Shakespearean metaphors, responded half seriously: "For the simple reason that there are more Democrats in the district than Republicans." In a more serious tone, Denis pointed out that he is a Republican, and reminded the audience that he mentioned it in his opening remarks.

Marks persisted. "I'm talking about that great big sign," he said, referring to Denis' new pride-and-joy, a $30-a-day "Denis" billboard on Bradley Boulevard in Bethesda. The billboard does not mention "Republican." Replied Denis, "I wanted to make the sign as neat as possible."

"They don't identify themselves," an angry Marks said later. "If they subscribe to the Republican philosophy of government, they should so state. If not, they shouldn't be running on that ticket. It annoys me that those people hide their party and you don't know what the hell they stand for."

Another person who thinks Denis is avoiding his own party's label is 35-year-old lawyer Brian Frosh, Denis' Democratic opponent. Denis' party is something Frosh wants to keep bringing up.

"He won't tell people he's a Republican," said Frosh. "He says it isn't an issue. I think it is an issue. The Republican Party stands for something I don't agree with: Ronald Reagan. And he Denis supported Reagan in 1980."

"That's absurd, ludicrous and perposterous," answers Denis. "Ronald Reagan isn't running for state senator from the 16th District."

Denis prefers to talk about his record in Annapolis: sponsorship of a bill placing more retarded persons in communities; filing of a suit that forced the legislature to open its budget conference committees to the public; cosponsorship of a bill requiring judges to wait for a victim-impact statement before sentencing criminals and support of the perennially defeated plan to require covers on trucks.

In Montgomery County, where registered Democrats outnumber Republicans by 2-to-1, being a Republican is nothing to boast about. Most of the Republicans elected in the county, including Denis, Del. Constance Morella, who also represents the 16th, and outgoing Del. Luiz R. Simmons, have been moderates in the tradition of Sen. Charles McC. Mathias and former representative Gilbert Gude.

Their strategy of winning is simple: Downplay the party, play up the record, appeal to Democratic voters, and always, always run scared. One who didn't run scared was former Rep. Newton I. Steers, who got complacent and lost in 1978.

The 16th Legislative District, stretching from the District line at Western Avenue west from Wisconsin Avenue, and encompassing Chevy Chase and Bethesda, is less heavily Democratic than the rest of the county. And the independent-minded voters in that silk-stocking district have been electing Republicans for years.

Denis won the seat in 1978 by a scant 211 votes, after serving two years as the appointed senator. Now, as evidence of the heavy turnover in Maryland's General Assembly, Denis, if reelected, would become the ranking minority member of the Senate.

For that very reason, Denis has been targeted by the dominant Democratic Party. Democratic leaders feel that the tenor of these times -- including suspected voter disaffection with the Reagan administration -- could serve them in their bid to unseat Denis. Frosh has been promised campaigning help from Rep. Michael D. Barnes, Attourney General Stephen Sachs and Sen Paul Sarbanes.

"They're Froshing at the mouth to get me," said Denis, unable to resist the pun.

Senis, who is bringing in his own heavy hitter, Sen. Mathias, thinks the 16th District voters are too independent-minded to be swayed by Frosh's Democratic endorsements.

Although this is Frosh's first run for elected office, he is no stranger to Democratic politics -- he worked for the Hunphrey and McGovern presidential campaigns, for State Sen. Margaret C. Schweinhaut's congressional campaign, and as the Annapolis lobbyist for the old county Department of Employment and Social Services. He is a native of the county and the son of a well-known circuit court judge.

Frosh's pitch is that Denis, as a member of the minority party, is ineffecutal in Annapolis. "And at least now that you have a Republican president, you'd think he [Denis] would at least be effective lobbying for Montgomery County. Reagan is very much an issue in Maryland. His policies have adversely affected the people of Maryland and Denis hasn't done a dammed thing about it."

Frosh believes he can win solely on the voter registration figures if, as he says, he can "keep the flock together." In 1978, Denis was able to attract Democrats, many of whom Frosh believes were Jews who voted for Denis because his is Jewish. "This year, I don't think he'll have a monopoly on Jewish support," said Frosh, who is also Jewish.

Frosh believes his main problem is name recognition. He says that partly because of hard work, Denis is about as well-known as a candidate can be who is running for a largely invisible office. By election day, Denis expects his grueling pace of door-knocking will have taken his to 30,000 households. He says he now even dreams about walking up and down hills.

But Frosh also thinks Denis' name recognition comes from the press attention he receives. Denis is extremely quotable -- he compares the often-by-zantine world of State House politics to Shakespearean dramas and obscure World War I battles. Next to retiring State Sen. Victor L. Crawford, Denis is considered by some reporters "the best third paragraph man in the business" -- meaning Denis always has a handy quotations sizing up a complex situation.

"He is quick on his feet and he is quotable," Frosh sighed."Maybe I ought to start learning some Shakespeare.