Syllabus Schedule Project Labs Canvas Server Access CSS Tutorial Assignment 1 Assignment 2 Assignment 3 Assignment 4 Assignment 5 Assignment 6 Assignment 7 Assignment 8 Assignment 9

Assignment 1 - Introduction to ASP.NET MVC using C#


Use Visual Studio 2013 (VS) for all of the course assignments. Visual Studio 2015 uses a newer version of Sql Server database which is not supported on the Yorktown server. Use VS to write and debug your code then use VS to publish it on the server. Test your code on the server and submit the working URLs via Canvas. Visual Studio Express 2013 is a free download with includes a lightweight version of Sql Server database called LocalDB. Visual Studio 2013 is available in the Parks Hall computer labs (and possibly other labs on campus).

During this course you will create only one new project in VS and add new code to it throughout the quarter. Your hosting on Yorktown supports only one project so if you create more than one you will run into problems on the server.

The assignment instructions include working samples. The code you submit must have the same functionality as the working samples. Your layout may be different.

To enlarge an image in the assignment instructions right-click on the image and select "Open image in new tab."

view in browser
  1. HelloWorld/welcome/Heather/6 -- Microsoft has written an excellent tutorial Getting Started with ASP.NET MVC 5 that explains how to create a new project in VS, the MVC design pattern, and creating controllers, models, and views. Compete the first two steps of the tutorial as explained below:
    1. Getting Started - Name your project Mis324Assignments rather than MvcMovie. You will be using this project for all of your assignments.
    2. Adding a controller - MVC projects typically start with a model but the tutorial starts with a controller to discuss routing. When you copy the code from the tutorial for the controller copy only the code inside the class (since your project had a different name you don’t want to change the namespace on line 7.)
    3. Tip: rather than using the debugger to view your executed code press Ctrl-Shift-b to compile your code then right-click on the Views folder and select “View in Browser.” Thereafter as you modify your code you can simply recompile it (with Ctrl-Shift-b) and refresh the browser.
    4. Publishing to the server: when you code is working correctly in VS you can upload it to the server. Steps: publish
      1. Create a network drive map to the server.
      2. In VS solution explorer right click on the name of your application (Mis324Assignments) and select “Publish...”
      3. Click “Custom” and add a profile name.
      4. For Publish Method select “File System.”
      5. Click the “...” and find your network drive map and root folder on Yorktown (your root folder has your WWU username).
      6. Click “Open,” next, next, and Publish.
      7. The URL on the server will be similar to this:
      8. In the browser you should see the default page for your web site.
      9.  Add the name of your controller and any parameters:
      10. Submit your Yorktown URL in Canvas. File System
  2. helloWorld/welcome2?name=Heather&numTimes=6 - Complete the third part of the tutorial Adding a View. Tips:
    1. The tutorial asks you to modify the Welcome action method that you created in the previous step. Instead add a second action method named "Welcome2" so that your answer for part one is not affected. Also name the view Welcome2.cshtml.
    2. Publish your code to the server and submit the URL as in the previous exercise.
    3. Complete! You have created your first MVC web application.
Add View

Submission instructions: Submit assignments via the Canvas course management system. Submit the full URL for each exercise in the assignment, listing the URLs in the same order that they are listed in the assignment. To minimize typos in URLs it is strongly recommended that you copy the URLs from the address bar of the browser rather than trying to type them. Incorrect URLs will not be graded and no credit will be given.

When pages are connected via navigation (as in your music store project) it is only necessary to submit the URL of the first page.