Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment: Object Models and MVC1 Create a new Controller called Weeks (WeeksController.cs). The Index ActionResult method (in the controller) will be created automatically. Be sure

Assignment: Object Models and MVC1 Create a new Controller called Weeks (WeeksController.cs). The Index ActionResult method (in the controller) will be created automatically. Be sure to create the Index view (cshtml file) as well. This Index view should populate the

tag with ViewBag.Title. It should also have an html

tag that states the view: This is the Index view. In the WeeksController.cs file add an ActionResult (get) method for seven views. 1. Saturday 2. Sunday 3. Monday 4. Tuesday 5. Wednesday 6. Thursday 7. Friday Right click on each of the seven ActionResult methods (in the WeeksController.cs file) and click Add View to create the cshtml file. The Index view should have seven Html ActionLinks that hyperlinks you to each of the seven views. Each ActionLink should be separated by the | character (pipe). It should look like the screen shot below. Each view should populate the

tag with ViewBag.Title. They should also have an html

tag that states the view: This is the Saturday view., This is the Sunday view., etc. Under the p tag on each of the seven views should have an html Home button like the screen shot below. The Home button on each of the days views should be inside an Html BeginForm(). In the WeeksController.cs file add an ActionResult (post) method that contains a FormCollection object as the parameter (col) for each of the seven views. Each ActionResult (post) method should have an if statement that evaluates the col["btnSubmit"]. If that equals (hint: use ==) the phrase home, use the RedirectToAction() method to return to the Index view.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions