Skip to content

NehG/COMP2084-MidTerm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COMP2084-MidTerm

COMP2084 MIDTERM EXAM

Find and correct the 4 errors in the project – 1 is in the C# code and prevents the application from building, 1 is a logic error in the C# code that does not prevent building, and 2 are in the HTML and / or configuration. Use Visual Studio’s tips and error log to help you. (4 marks)

Add your full name and student number to the footer text (1 mark)

Make the Cities Delete and DeleteConfirmed methods private so any Authenticated User can access them (there is no need for different User Roles. DO NOT restrict access only to administrators.) (2 marks)

On the Cities/Index view: (3 marks)

Change the display so the Cities are displayed A-Z by Country Name, then A-Z by City Name

Change the page title and content heading to “Cities” and the 2 “Name” column headings to “Country” and “City”

Hide the Delete links for anonymous users but make these links visible for any authenticated users (i.e. have logged in to the site). So anonymous users can only view, add, and edit but they must log in order to Delete any city.

On the Cities/Create and Cities/Edit views: (2 marks)

Order the Countries in the Dropdown list alphabetically A-Z by Country Name

In the City model (2 marks):

Modify the “CountryId” property so it displays as “Country” in any City Views

Modify the “YearFounded” property so it displays as “Year Founded” in any City Views

Force the site to use SSL for all requests: (1 mark)