"So, I was going to ask you for your number, but then I realized I don't have a name to put it under. I figured maybe I should start there, and if you'd like, we could work our way up to numbers."

Has that "accidentally cool" vibe to it. Shy and awkward on the very surface, but oozing confidence.

Or.

"So, yeah, I totally just realized that I've been enjoying hanging out with this girl whose name I have up until now not actually learned, so I feel like kind of a tool. Help a guy out?"

I could keep going, but I think you get the idea. There's lots of ways to admit that you don't know something important about someone, but you still care about them/like them.