コード例 #1
0
        public ActionResult GreetingCard()
        {
            LetterVariable myLetterVariable = new LetterVariable();

            myLetterVariable.SetName(Request.Query["Name"]);
            myLetterVariable.SetAnotherName(Request.Query["AnotherName"]);
            myLetterVariable.SetAnimal(Request.Query["Animal"]);
            myLetterVariable.SetExclamation(Request.Query["Exclamation"]);
            myLetterVariable.SetVerb(Request.Query["Verb"]);
            myLetterVariable.SetNoun(Request.Query["Noun"]);
            return(View("Home", myLetterVariable));
        }
コード例 #2
0
        public ActionResult MadLibsResult()
        {
            LetterVariable myLetterVariable = new LetterVariable();

            myLetterVariable.SetPerson1(Request.Query["person1"]);
            myLetterVariable.SetPerson2(Request.Query["person2"]);
            myLetterVariable.SetAnimal(Request.Query["animal"]);
            myLetterVariable.SetExclamation(Request.Query["exclamation"]);
            myLetterVariable.SetVerb(Request.Query["verb"]);
            myLetterVariable.SetNoun(Request.Query["noun"]);

            return(View("MadLibsResult", myLetterVariable));
        }