Exemple #1
0
        public ActionResult MadLibsStory()
        {
            MadLibsVariable myMadLibs = new MadLibsVariable();

            myMadLibs.SetPerson1(Request.Query["person1"]);
            myMadLibs.SetPerson2(Request.Query["person2"]);
            myMadLibs.SetAnimal(Request.Query["animal"]);
            myMadLibs.SetExclaimation(Request.Query["exclaimation"]);
            myMadLibs.SetVerb(Request.Query["verb"]);
            myMadLibs.SetNoun(Request.Query["noun"]);
            return(View("MadLibs", myMadLibs));
        }
        public ActionResult MadLibs(string person1, string person2, string animal, string exclamation, string verb, string noun)
        {
            MadLibsVariable myMadLibsVariable = new MadLibsVariable();

            myMadLibsVariable.SetPerson1(person1);
            myMadLibsVariable.SetPerson2(person2);
            myMadLibsVariable.SetAnimal(animal);
            myMadLibsVariable.SetExclamation(exclamation);
            myMadLibsVariable.SetVerb(verb);
            myMadLibsVariable.SetNoun(noun);

            return(View(myMadLibsVariable));
        }