You are required to further develop the Best Bikes website using ASP.NET 4.5.1 and C#. You must develop the web pages according to the specifications given in this document. This means that you must provide the functionality specified, produce the layout specified and use the data and images provided on the course website.

You are required to further develop the Best Bikes website using ASP.NET 4.5.1 and C#. You must develop the web pages according to the specifications given in this document. This means that you must provide the functionality specified, produce the layout specified and use the data and images provided on the course website. 150 150 Affordable Capstone Projects Written from Scratch

Page 1 of 18
Practical assessment 2—ASP.NET 4.5.1
Due date: 11:50 pm AEST, Friday Week 10 ASSESSMENT
Weighting: 35%
Length: No set length 2
Objectives
This assessment item relates to the course learning outcome numbers 2 and 3.
More specifically, the objective of this assignment is for students to:
• Develop, test and maintain a dynamic Internet application for business using an integrated suite of
software tools.
Introduction
You are required to further develop the Best Bikes website using ASP.NET 4.5.1 and C#. You must develop
the web pages according to the specifications given in this document. This means that you must provide the
functionality specified, produce the layout specified and use the data and images provided on the course
website. You may change the colour scheme and general styling, but you may not change the layout or
functionality described. This document is a specification that you are required to implement.
Overview of website to be developed
Your website must:
• Use a master page and content pages throughout
• Define and use a consistent theme throughout
• Use a web.sitemap and related navigation controls
• Use roles and authorization rules to implement site security
• Use a database to retrieve bike details; this database will be supplied to you
• Simulate implementing a shopping cart so that bikes can be bought from the catalog pages.
You are also required to:
• Discuss any design changes necessary for adapting the website for use on a mobile device using
jQuery Mobile.
• Submit a brief Word document describing what features did and did not work in your website.
You are required to develop the following content pages:
Web Page Description
Default.aspx The default home page.
Pages/OurRange.aspx Top level page under the “Our Range” menu option
Pages/BikeList.aspx Lists bikes from different series in a grid view format,
includes drop-down list filter, thumbnails and hyperlinks.
Pages/BikeCatalogue.aspx Lists all the bikes in a catalogue format.
Pages/Specials.aspx Lists bikes that are available on sale at 10% off their sale
price.
Page 2 of 18
Pages/Dealers.aspx A page accessible by dealers only. This page lists all bikes in
a grid view format at dealers’ prices.
Pages/ChangePassword.aspx This page allows authenticated users to change their
password.
Pages/Register.aspx This page allows users to register as a member.
Admin/Default.aspx The top-level page in the admin menu.
Admin/AddUser.aspx This page allows admin users to add a new user.
Admin/AddUserToRole.aspx This page allows admin users to add an existing user to an
existing role.
Admin/ManageCatalogue.aspx This page allows admin users to add, edit or delete bikes from
the bikes database.
Shopping/Default.aspx This page implements the view if the top level Shopping
menu is selected
Shopping/Checkout.aspx This page implements the checking out stage of the Ecommerce
pipeline
Shopping/ShoppingCart.ascx This page implements the shopping cart control used in the
ShoppingCart and Checkout pages
Shopping/ShoppingCart.aspx This page implements the displaying of the contents of the
current shopping list
Shopping/ShoppingCartItem.aspx This page contains details on a single item, and the link to
add the item to the shopping cart
You must also create the Web.sitemap and Masterpage.master files, as well as make appropriate edits
to the web.config file.
These requirements are discussed in more detail below.
Provided materials – starter kit
To get you started, an assignment 2 starter kit is available on the web site. This starter kit contains:
• The Images directory containing all the images required for the assignment
• Bikes.mdf – the Microsoft Access database used for this assignment
• The StyleSheet.css files required for the themes for this assignment
Website structure
The files in your website should be structured in the following way:
Page 3 of 18
Web.sitemap
You must construct your web.sitemap to achieve the following menu hierarchy:
The menu items above must map to the following content pages:
Menu item Content page
Home ~/Default.aspx
Our range ~/Pages/OurRange.aspx
Our range > View as list ~/Pages/BikeList.aspx
Our range > View as catalogue ~/Pages/BikeCatalogue.aspx
Specials ~/Pages/Specials.aspx
Dealers ~/Pages/Dealers.aspx
Change password ~/Pages/ChangePassword.aspx
Administration ~/Admin/Default.aspx
Best Bikes
Admin
AddUser.aspx
AddUserToRole.aspx
Default.aspx
ManageCatalogue.aspx
Pages
BikeList.aspx
BikeCatalogue.aspx
Dealers.aspx
Specials.aspx
Register.aspx
ChangePassword.aspx
OurRange.aspx
App_Data
Images
Default.aspx
MasterPage.master
Web.config
Web.sitemap
Bikes.mdf
Themes
Shopping
Default.aspx
ShoppingCart.ascx
ShoppingCartPage.aspx
Checkout.aspx
ShoppingCartItem.aspx
Home
Our range
Dealers
Add user to role
Manage catalogue
Add new user
View as list
View as catalogue
Change password
Ckeckout
Admin
Specials
About
Contact us
About us
Shopping cart item
Checkout
Shopping cart
Page 4 of 18
Administration > Manage catalogue ~/Admin/ManageCatalogue.aspx
Administration > Add new user ~/Admin/AddUser.apsx
Administration > Add user to role ~/Admin/AddUserToRole.aspx
Checkout ~/Shopping/Default.aspx
Checkout > Checkout ~/Shopping/Checkout.aspx
Checkout > Shopping Cart ~/Shopping/ShoppingCartPage.aspx
Checkout > Shopping cart item ~/Shopping/ShoppingCartItem.aspx
Master page
Your master page must achieve the following layout (unchanged from assignment 1):
Header
The header must contain the logo. The actual logo displayed will depend on the theme. Your Colour
theme uses a student created logo or can use the supplied headerlogo.jpg. The Monochrome theme
uses headerlogo.jpg and is copied from the supplied Stylesheet.css file in the starter kit.
Nav
The Nav div should contain a Menu control. Note:
• The Menu control must obtain its menu items from the Web.sitemap file; menu items should not
be hard coded into the TreeView control.
• Your Menu control should not show the top (Home) node.
Aside – menu
The aside will be used in assignment 2 for providing a login area.
Footer
The footer contains two other divisions – the copyright and lastupdate divisions. The copyright
division should contain a copyright symbol, your name and the current year, along with the image copyright
Header
Content
Footer
Aside
Nav
Page 5 of 18
statement. The lastupdate division should contain the date that the website was last updated. You may
hard code this date.
Breadcrumb
The breadcrumb in the content area should contain a SiteMapPath control. Your breadcrumb should not be
hardcoded.
The database file
A SQL database is provided to you in the Assignment 2 starter kit. It contains all the necessary data required
for this assignment. The database is named Bike.mdf. You will need to place a copy of this database in the
App_Data directory of your website.
This database contains a table named Table. Table contains the following fields:
Field Data type Required Description
BikeId Autonumber (int) Yes Unique number for each bike, automatically supplied by
the database
Make nvarchar(50) Yes The manufacturer of the bike
Model nvarchar(50) Yes The bike model
Year smallint Yes The year of manufacture of the bike
Capacity smallint Yes The engine capacity in cc’s
SalePrice money Yes The normal price of the bike
DealerPrice money Yes The sales price to registered dealers
Featured bit Yes false if not on special, true if on special
Thumbnail nvarchar(50) Yes Url of small bike image
Image nvarchar(50) Yes Url of large bike image
If you wish to you can use the information from the above and the table below to re-create the database.
Page 6 of 18
Home page
The home page should appear as follows for an unauthenticated user:
Our Range
The Our Range page must appear as follows. Note that for brevity, only the main content area is shown.
Our range – view as list
The View as list page must appear as follows. Note that for brevity, only the main content area is shown.
Note that:
• No bikes will be shown until a Make has been selected.
• A GridView control should be used to achieve the table layout.
• The GridView control must be bound to the Table table in the database.
Page 7 of 18
• SalePrice must be appropriately formatted to appear as currency and should be right aligned.
• The image is the image whose hyperlinked is given in the Thumbnail field in the Table table.
• The GridView must have sorting enabled.
• Duplicates should not appear in the DropDownList list.
• When a particular Make value is selected from the DropDownList list, the GridView should be
updated to show all bikes with that Make value.
• The Larger Image hyperlink will open a new page the larger image of the bike shown.
• The Add to cart link will add the cart to the list on the ShoppingCartItem.aspx page.
Our range – View as catalogue
The View as Catalogue page must appear as follows. Note that for brevity, only the main content area is
shown.
The formatting considerations that apply to this page are shown. You should use a GridView to achieve
this effect. The SalePrice should be formatted as currency and an Add to cart hyperlink used that
adds the chosen bike to the ShoppingCartItem.aspx page.
Page 8 of 18
Aside – login
The Aside must contain a LoginView control. You are to use the LoginView control to display different
content depending on whether or not the user is authenticated. Specifically,
• if the user is un-authenticated (i.e. not logged in), they should see a login control as follows:
Note that:
a) You should apply the CssClass loginControl to the Login control. This will help achieve the
appearance shown above.
b) You should not display the “Remember me” textbox.
c) The hyperlink underneath the “Log In” button should say: Not a member? Please Register. You
can do this by setting the CreateUserText property. Clicking this link should take the user to
~/Pages/Register.aspx.
d) Experiment with the TextLayout property to obtain the layout above.
• If the user is authenticated, they should see a Login name and LoginStatus control. A user
logged as Ron should see the following:
Note that a LoginName and a LoginStatus control are used to achieve this. If the user logs out
they should be directed to the Default.aspx page for the website.
Roles and security
You are required to:
• Create appropriate roles, as described below
• Create three users for testing, as described below
• Implement authorization rules to achieve the security access, as described below
• Implement security trimming; guidance is given below
• Set the home page as the login page; guidance is given below.
Roles
You are required to create three roles as follows:
Member
Dealer
Admin
You may use the WSAT tool to create these three roles.
Page 9 of 18
Roles
You should create the following three roles for the purposes of testing and marking. Failure to create these
roles may result in loss of marks:
User Name Password Role
maria maria@123 Member
jacquie jacquie@123 Dealer
denise admin@123 Admin
Authorization rules
Access to content pages must be restricted as shown below. You are required to add the appropriate
authorization rules to the Web.config file to achieve the security restrictions shown below:
Page name Unauthenticated
users
Any
authenticated
user
Member Dealer Admin
Home ü ü ü ü ü
Our range ü ü ü ü ü
Our range > View as list ü ü ü ü ü
Our range > View as
catalogue
ü ü ü ü ü
Specials see note below ü ü ü ü
Dealers ü û ü ü
Change password û ü n/a n/a n/a
Administration û û û û ü
Administration > Manage
catalogue
û û û û ü
Administration > Add new
user
û û û û ü
Administration > Add user
to role
û û û û ü
Shopping Cart ü ü ü ü ü
Checkout > Checkout ü ü ü ü ü
Checkout > Shopping cart ü ü ü ü ü
Checkout > Shopping cart
item
ü ü ü ü ü
Note: Refer to the section below on the Current specials page for more information.
Security trimming
You must implement security trimming. Security trimming means that a user can only see those menu
items for which they have authorization. They cannot see menu items for pages that they do not have
authorization. To implement security trimming, add the following code to your Web.config file just before
the closing tag of </system.web>:
<siteMap defaultProvider=”XmlSiteMapProvider” enabled=”true”>
<providers>
<add name=”XmlSiteMapProvider”
description=”Default SiteMap provider.”
type=”System.Web.XmlSiteMapProvider”
siteMapFile=”Web.sitemap”
securityTrimmingEnabled=”true”/>
</providers>
</siteMap>
Page 10 of 18
Setting the login page
When a user attempts to access a page for which they are not authorized, the web server will re-direct the
user to the login page. You must ensure that the user is re-directed to the home page for login services. To
do this, add <forms loginUrl=”Default.aspx”> to the Web.config file between authentication
mode tags as follows:
<authentication mode=”Forms”>
<forms loginUrl=”Default.aspx”></forms>
</authentication>
Also note the mode attribute must be set to “Forms” and the authentication element must be a pair of opening
and closing tags.
Specials
Specials are those Bikes that have a value of True in the Featured column in the Table table. Any bike
that is currently on special is available to registered members at 10% off the sale price.
Specials are only available to registered members. However, you should not use an authorization rule to
implement this security. You are to use a LoginView control to display alternate content depending on
whether the user is authenticated or not.
To an unauthenticated user, the Specials page must appear as follows. Note that for brevity, only the main
content area is shown.
Note that the register now hyperlink must link to ~/Pages/Register.aspx. The register page is
described in more detail below.
To an authenticated user (ie a Member, Dealer or to Admin), the Specials page must appear as follows:
Note that:
• GridView controls should be used to achieve the table layout.
• The GridView controls must be bound to the Table table in the database.
• Only Table bikes that have a Featured value of True should appear in these lists. You can
achieve this by adding a WHERE condition when configuring the data source object.
Page 11 of 18
• Sales Price must be appropriately formatted to appear as currency and should be right aligned.
• Capacity field must be center aligned.
• The image is found in the Thumbnail field of the bike in the Table table.
• The GridView must have sorting enabled.
• The Sales Price column is a calculated field. It is not available directly from the database; you
must calculate it in the underlying SELECT query. To do this:
o Set up your GridView and data source using Special Price in lieu of SalePrice.
o Switch to Source view. Alter the SelectCommand of the data source object, change
[SalePrice],
to:
[SalePrice] * 0.9 AS [Sales Price],
o Refresh your GridView schema using the smart panel.
• The Larger Image hyperlink will open a new page the larger image of the bike shown.
• The Add to cart link will add the cart to the list on the ShoppingCartItem.aspx page,
passing the Special Price as a HTML query string parameter.
Dealers
To dealers, the Dealer page must appear as follows:
Note that:
• GridView controls should be used to achieve the table layout and each table should have its own
GridView.
• The GridView controls must be bound to the bike Table table in the database.
• Dealer Price must be appropriately formatted to appear as currency and should be right aligned
and is bound to the DealerPrice in the Table table.
Page 12 of 18
• The image is the image given in the Url in the Thumbnail field of the Table table.
• The GridView must have sorting enabled.
• The Add to cart link will add the cart to the list on the ShoppingCartItem.aspx page,
passing the DealerPrice as a HTML query string parameter.
Change password
The Change Password page should appear as follows. For brevity, only the content area is shown.
Note that you may use the change password control. You should return to the BikeList page upon success.
Register page
The Register page should appear as follows. For brevity, only the content area is shown.
Note that:
• The newly created user must be added to the member role.
• The newly created user should be automatically logged in and the Specials page shown when the
user clicks continue on the Complete step of the CreateUserWizard.
• You may adjust your Web.config file so that the security question and answer are not required if
desired.
Administration – Default page
The default administration page should appear as follows (assuming the Admin person is Ron):
Page 13 of 18
Administration – Manage catalogue
The manage catalogue page should appear as follows. For brevity, only the content area is shown.
This page consists of a DropDownList control, a GridView control and a FormView control. The
GridView control lists existing Bikes in the catalogue; the FormView is to be used for adding a new Bike to
the catalogue.
With respect to the drop-down list control, note that:
• The drop-down list must show a list of all Make’s that appear in the Table table.
• Duplicates should not appear in the drop-down list.
• When a Make is selected from the drop-down list, the GridView should be updated to show all
BikeID’s with that Make.
With respect to the GridView, note that:
• The GridView must be bound to the Table table in the database.
• All prices must be appropriately formatted to appear as currency and should be right aligned.
• Editing, deleting and sorting must be enabled.
With respect to the FormView control, note that:
• The default mode must be insert.
• There is no field in the form view for Id. You should remove this field from the insert item template
of the form view. The Id field should be set automatically.
• There is no field in the form view for Make. You should remove this field from the insert item
template of the form view. The Make field should be set to the value selected in the
DropDownList during the inserting event.
• The inserted record should appear in the GridView immediately.
Page 14 of 18
Administration – Add new user
The Add new user page must appear as follows. Note that for brevity, only the main content area is shown.
Note that
• you may simply use the CreateUserWizard control
• you may configure your Web.config file to remove the security question and answer if desired.
Administration – Add user to role
The add user to role page must appear as follows. Note that for brevity, only the main content area is
shown.
This page consists of two list boxes, a button and a label control. Note that:
• The first ListBox must display a list of users from the SQL database. Do not hard code these
names.
• The second ListBox must display a list of roles from SQL database. Do not hard code these roles.
• You must develop code for the button on-click event. When the user selects a user and a role and
then clicks the add user to role button, your code should:
o Check to see if the selected user is already in the selected role
o If the user is not in that role, then add the user to the role and display, for example, User Ron
added to role admin in the label control. The name and role displayed in the message should
be the same as those selected in the list boxes.
o If the user is already in that role, then the message User Ron is already in role admin should
be displayed in the label control. The name and role displayed in the message should be the
same as those selected in the list boxes. For example:
Page 15 of 18
Shopping Cart Item Page
The shopping cart item page should appear as follows:
Note that:
• When a user clicks on Add to cart on the BikeList.aspx, BikeCatalog.aspx,
Dealers.aspx or Specials.aspx pages the bike selected will appear on this page as shown.
• The Price shown should be the normal, sales or dealer price depending from the page where the
Bike was added.
• You can create your own Add To Cart image for the button.
• All information and choices must be stored in the user Profile between user sessions.
Shopping Cart Page
The shopping cart page should appear as follows:
Note that:
Page 16 of 18
• A control should be used on the ShoppingCartPage.aspx to implement this. The control
should use a GridView to achieve the table layout.
• All the items that have been added to the cart should be displayed and the total should appear on the
bottom of the table as shown.
• The Checkout hyperlink should take you to the ~/Shopping/Checkout.aspx page.
• All information and choices must be stored in the user Profile between user sessions.
Checkout page
To the unauthenticated user the Login step of the CreateUserWizard of the checkout pages should
appear as follows:
The authenticated user should be taken straight to the Delivery Address step. The Delivery
Address step should appear as follows:
• If the Use membership address box is checked then the address stored in the user profile should be
used as the delivery address.
The Payment step should appear as follows:
The Confirmation step should appear as follows:
The Completion step should appear as follows:
Page 17 of 18
• When the Finish button is pressed the user should be taken back to the BikeCatalogue.aspx
page.
Word document
You are to prepare a brief Word document. Your document should:
• Include an appropriate title page.
• List the features you successfully implemented, there is no need to describe them.
• List the features you were unable to successfully implement; you should describe the problem in a
few sentences and also briefly describe anything you attempted to get it to work. Your approach to
identifying and attempting to fix these bugs may gain you some partial credit for those features you
were unable to implement.
• A description of any additional functionality you believe would be useful to add to this Website.
Explain what the features are and how they would help to improve the Website.
• You are to include a discussion of what design changes would be needed to create a mobile version
of this website.
• References (if any) listed using the Harvard Referencing Style.
Submission
You are required to submit your assignment electronically via the Moodle course website. You must zip (or
create a .rar archive) together:
• The directory containing your ASP.NET website.
• Your Word document
The resulting zip file should be submitted on the course website. Please note that you should use your
student ID to name your uploaded for this assignment.
Image copyrights
Important note to students: The images supplied on the course Website for this assignment are only to be
used in preparing the solution for this assignment. Use of these images for any other purpose is strictly
prohibited in accordance with the copyright laws.
Page 18 of 18
Assessment criteria
Assignment
Component Criteria Marks Total
Master page – Login – Login controls are present on master page
– Correct view of login controls for authenticated vs unauthenticated user 2
Roles & security
– Appropriate security rules present in web.config
– Navigation menu is trimmed
– Not possible to access pages directly unless user is authorised
3
View as list
– Drop-down filter contains list of Makes, no duplicates
– Drop-down selection correctly filters gridview
– Fields correctly formatted, sorting is enabled and hyperlink to cart
works
1.5
View as catalogue – Catalogue appearance is correct
– Hyperlink to cart works correctly 1
Specials/Dealers
– Correct content view according to user’s role/authentication
– Specials price is calculated and shown, currency correctly formatted,
hyperlink to cart works correctly and sorting is enabled
– Dealers price is shown, currency correctly formatted, hyperlink to cart
works correctly and sorting is enabled
2
Register – User can register
– New user is automatically added to the member role 1.5
Change password – Only authenticated users can access the page
– Authenticated user can change password 1
Admin – manage
catalogue
– Filter has list of Makes, no duplicates
– Selection of Makes filters gridview
– Grid view has appropriate formatting and alignment of columns
– Items in gridview can be edited/deleted
– New item can be added via form view
– BikeID and Make values added automatically during inserting event
6
Admin – Add user – Admin user can add new user
– Admin user is not logged in as new user 2
Admin – Add user
to role
– User can be added to role
– Correct response when user is already in role 2
ShoppingCartItem
page
– Image of item is correctly displayed
– Add to cart button displays the shopping cart and adds the item to the
shopping cart
– Specials price is correct
2.5
ShoppingCart page
– Uses a control to display the information that shows all items that have
been added to the cart
– Allows the items to be deleted and allows the Quantity to be edited
– Correctly displays the Total and hyperlink to Checkout page
3
Checkout page
– Login for unauthenticated users displayed, but not displayed for
authenticated users
– Delivery address and payment step correct
– Confirmation step displays the shopping cart correctly
– Completion step takes user back to BikeCatalogue page
2
Web.config – The profile has been added to allow saving of customer selections and
data between visits to site 1
Shopping.cs – The shopping.cs code has been modified correctly 0.5
Web.config – The profile has been added to allow saving of customer selections and
data between visits to site 1
Word document
– Lists complete and incomplete stages and describes steps taken to fix
incomplete functionality (if applicable)
– Suggestions for new functionality
– Discussion of changes required to build a mobile version of the website
3
Penalties
Total 35
Comments:
Lecturer’s Signature Date:


 

TO GET THIS OR ANY OTHER ASSIGNMENT DONE FOR YOU FROM SCRATCH, PLACE A NEW ORDER HERE