Hi K.,
I would be very careful not to let this become a control issue between you and your little one. If she senses that you are frustrated than she,too, will become frustrated. Sometimes frustration turns into anger and then into a control issue---especially for two year olds who want to control everything!
One thing that I would really encourage is that you don't respond negatively at all when she pottys in her pants. Just make a comment like "oops, I guess you didn't make it, we'll have to try next time."
I would also take her shopping and let her pick out some character underwear. Make it a character that she really enjoys. Then explain to her, "okay, now when you wear these you will have to do your best not to get 'Elmo' wet, cuz' he really doesn't like to be wet. (I even let my little one look in the boys' underwear when we couldn't find her character in the girls'---and in desperation, I made computerized iron-on transfers and ironed my son's favorite character on white underwear when we couldn't find his choice!!)
I really, really liked Beth M.s response to you. I would let your little girl pick out some stickers that SHE likes. I'd be careful to explain that the only way she gets those stickers is if she goes potty in the potty.
Together decorate a box and fill it with little "treats"...maybe a Choc. kiss, or a little toy, or bubbles etc. Explain that she can only pick ONE toy or pc. of candy when she fills her sticker chart up.
Then, start easy, make the first sticker chart with only two spaces to put stickers...so that she only has to go to the potty twice in the potty to earn a treat.
Next time, put three spaces she must fill before earning a treat etc etc. When you are confident that she is completely in control, then make the chart with many more spaces for stickers and make the prize something big that she has helped you pick out in the toy department. When she has has earned all those stickers, she gets one last prize.
As she is earning that last big prize be sure to mention to her often that you are so proud of because she has earned the biggest (and last) prize. (That way she gets used to the idea that she isn't going to get a prize for the rest of her life)
The biggy in all of this is not to react negatively to accidents. This gives her the idea that "if mommy isn't paying attention to me, I just mess my pants and mommy pays lots of attention--even if it isn't happy attention, at least it's attention" and it also keeps the negative feelings associated with bathrooming down to a minimum. The last thing you want is for her to associate bathrooming with "being bad".
Most of all, remember, she is still just a baby and she really wants to please her mommy!
Good luck!