Katy Perry and “Glee’s” guest star Darren Criss performed the track “Teenage Dream” together live at the Trevor Project Live event.

Both stars had hits in the show. Criss performed the tune on the Fox show “Glee” while Perry released the song as the second single from her album with the same name.

Criss was onstage performing the song with the Dalton Academy Warblers when Perry came on stage.

Criss said “She's been really sweet… It's a great tune. I really lucked out that I got to sing that song. I mean, you've gotta sing what they give you."

Other performances included a spoken-word number from Queen Latifah as well as the Hollywood Bowl cast of “Rent” singing "Seasons of Love" and "Will I."

Glee’s Jane Lynch also honored Kathy Griffin for donating her paycheck from an L.A.-area stand-up gig.

Other big names in the audience were Neil Patrick Harris, Jesse Tyler Ferguson, Rashida Jones, David Arquette, Sarah Silverman, Taye Diggs, Idina Menzel, Kate Walsh, Wayne Brady, Justin Long, Joe Manganiello, Kristin Davis, Brittany Snow, Amy Poehler, Will Arnett, Josh Duhamel, Anna Kendrick, James Marsden and Jessica Alba.

The Trevor Project is a nonprofit organization that offers suicide-prevention services to lesbian, gay, bisexual and transgender youth.