A former CNN producer took to Twitter on Friday to blast Jim Acosta, the network’s White House correspondent, for what he called Acosta’s “self-serving antics,” saying they “give all good journalists a bad name.”

The posts by Steve Krakauer, a former senior digital producer for the network who is now a top executive at Commerce House, a Dallas-based advertising firm, were prompted by a question that Acosta shouted to President Donald Trump on Friday during a White House event on the economy and tax cuts.

Trump used the event as an opportunity to extend condolences to the victims and survivors of Thursday’s tragedy at the offices of the Capital Gazette, where five employees were slain by a gunman who was later taken into custody.

Acosta tried to link the shooting to past criticisms that Trump had leveled toward members of the media, including calling them “the enemy of the people.”

As the audience applauded at the end of the president’s speech, Acosta shouted from the back of the room:

“Mr. President, will you stop calling us the enemy of the people, sir? Will you stop calling the press the enemy of the people, sir? Mr. President, will you stop calling the press the enemy of the people, sir?”

The question drew no response from Trump.

“Truly an embarrassment, on multiple levels,” Krakauer tweeted about Acosta’s performance.

He continued in a subsequent tweet: “On a day journalists could honor the memory of fellow reporters tragically killed due to a deranged person with a vendetta going back years, Acosta tries to shift the blame to Trump,” Krakauer wrote.

After the White House event, Acosta tweeted about his own performance: “I tried to ask the president if he would stop calling us the enemy of the people. He did not respond,” Acosta wrote.

He added: “We also had a few folks who shushed is (sic) in the audience. Of course we are not going to be shushed.”

Acosta is no stranger to controversy. Earlier in the week, the reporter drew shouts of “Go home!,” and “Fake news, Jim!” at a Trump rally in South Carolina.

One rallygoer, identified as Maria Rojas, personally confronted Acosta, telling him he doesn't respect the country.

“I do respect the United States, yes I do," Acosta told the woman in videos posted by an Associated Press reporter.

Anyone wanting more opportunity to make up their minds about Acosta can tune in Sunday to CNN’s “Reliable Sources” program, where host Brian Stelter is scheduled to interview his CNN colleague, Jim Acosta.

Fox News’ Nicole Darrah contributed to this story.