The best way to get a written recommendation is to be specific about what you'd like people to talk about. By doing this, you'll be sure to get the recommendation that will support your career goals.
A great written recommendation includes:
How you know the person (i.e. Jennifer and I worked on a project together)
3 skills you observed them use
What you appreciate most about them