This is more of a post for me so I can remember where it is but also in case
it will help anyone else who happens by. Even though the logic seems
pretty straight forward, I'm sure I would be beating my head on the desk until I
pieced it together myself.
Anyway, ASP.NET had this article
posted about it.