James Marsden has credited Julia Roberts for helping him to land a key part in Hairspray.

The Notebook star was desperate to get the part of TV host Corny Collins in the 2007 remake of the movie musical, and agreed to meet director Adam Shankman for lunch in an almost empty restaurant in New York.

But during a virtual episode of The Ellen DeGeneres Show, James told host Ellen just how stunned he was when the Oscar winner approached him and the moviemaker.

"In the middle of the interview... I had a tap on my shoulder and it was Julia Roberts," he recalled. "She said, 'I'm sorry to interrupt, but I just wanted to tell you you're in my favourite movie, The Notebook, and I love what you do in the film... and nice to meet you.’

"And then Adam Shankman turns to me and says, 'If you didn't have the job already, I think that sort of seals it,'" the Westworld star laughed, noting that he has the Pretty Woman actress to thank for helping him land the coveted part.

"So, I have Julia Roberts to thank for that. She was the one who cemented me getting cast in that role," James quipped.

The 46-year-old appeared alongside the likes of John Travolta, Michelle Pfeiffer, Christopher Walken, Zac Efron, and Amanda Bynes in the movie.

He was last seen onscreen in TV series Mrs. America and in the Sonic the Hedgehog movie.

LATEST NEWS