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 2017 (VS) for all of the course assignments. The recommended work flow for developing ASP.NET code is to use VS to write and debug your code. When your code is finished use VS's publish feature to publish it on the server. Test your code on the server and submit the working URLs via Canvas.

Visual Studio 2017 is available in the Parks Hall computer labs (047 and 210).

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.

Visual Studio Tip: In this assignment you will create a folder named Mis324Assignments. Inside this folder will be a solution file with the extension ".sln". To open an existing project double-click on the .sln file (rather than starting Visual Studio first). This assures that your project will open correctly.

The .sln file uses relative paths to your project files so it should not be moved from the project directory (you can create a shortcut to it and move the shortcut).

The assignment instructions include working samples. The code you submit must have the same functionality (or more) 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 - Use Visual Studio 2017 rather than 2013. Name your project Mis324Assignments rather than MvcMovie. You will be using this project for all of your assignments.
    2. Adding a controller - Copy the code from the exercise and then change the namespace from MvcMovie to the name of your project (Mis324Assignments).
    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.
  2. Add View 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. Complete! You have created your first MVC web application.
    3. Publishing to the server: when you code is working correctly in VS you can upload it to the server. Steps:
      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). The path will look similar to:
      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. Copy the Yorktown URLs from the browser and paste into Canvas.

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.

Regular Expressions HTML Color Names Color Picker ASCII Character Codes Unicode Character Codes