When my son did that, we sort of made a game out of it. He was saying no to everything. Then one day, in a very silly mood, I said dramatically, arms flailing wildly in mock vexation, "No no no NO! Is that ALL you can say is NO?" (He knew I was being goofy). He looked at me for a second, then grinned and said, "NO!!" I acted all horrified, clutching my heart as if I was having a drama queen heart attack and such, and he got a big laugh out of it. I then told him, "Okay, kiddo, go put that toy away (or whatever it was that I had asked before) and we'll get some lunch." I just said it as if I had no doubt in the world that he would of course jump up and do it. If he persisted with the 'no!', then I would act all silly and shocked again, and attack him with tickles or something. Then I'd tell him again, "Okay, kiddo, go put that toy away and we'll get that lunch." By that time, he was usually ready to do it. (He was probably exhausted from the tickles, lol.) If he kept it up, I'd act all old, hand at my lower back, hunched over, and tell him "Mom's getting too old for the tickles. Give me a hand and put that toy away. I'm hungry! How about you?" I don't think it ever when futher than that.
Oh, and if he said "YES!", I'd laugh hysterically and point at him and say, "See! You really CAN say something besides no! Glory be! Hallelujah!! Goody, now you can pick up that toy so we can get that lunch."
Neither of us were mad or frustrated with it, and after that, when the no's did happen again, I suspected it was more because he wanted the silly attention, and was glad to oblige. It seemed to point out to him that he WAS getting carried away with the no's, without being like discipline. It just became our joke. It didn't last long this way, and now if I hear "no", it's more a cue to get us both silly. (And silly is a lot more fun than defiance.)
I hope it works as well for you as it did for us!