Before you pin on your No Whining button and draw a line in the sand, make sure your toddler knows what you're talking about. Label whining when you hear it and ask your toddler to use her regular voice instead. If she has trouble hearing the difference, demonstrate it for her. Explain that whining sounds yucky and makes people stop listening. Acknowledge your child's need for attention.
Toddlers often resort to whining when they've tried and failed to get their parent's ear.
Once he sees that I'm listening, I can get him to tell me what he wants without whining. Whenever your child asks for something in a pleasant way, try to give her what she needs as immediately as you can. And praise her for waiting when she manages to. Show her a better way to address the problem. If your toddler can't get past the whining, try restating the issue for her.