Web460 Week 2 Lab – Guaranteed 100% Score

Lab Price = $15
Please feel free to send us your queries at: [email protected]
Payment Methods

Add to Cart

Buy Now

View Cart


Problem Statement
iLab 2 of 7: Creating and Using Master Pages
05:53 AM MT
07/15/2016
Listen
What’s this?

iLab Overview

Scenario/Summary

In this iLab, you create a master page for our bookstore website and then modify the checkout and order confirm pages from last week’s lab to use the master page.

Deliverables

NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.

(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)

The deliverables for this week’s lab are the following:

pgCheckOut.aspx
pgCheckOut.aspx.cs
pgConfirm.aspx
pgConfirm.aspx.cs
Web460Store.master
Web460Store.master.cs
web.config
Please zip and submit the entire web project folder to the assignment Dropbox.
Required Software

Visual Studio 2012

Set up the Visual Studio development environment and test the web server on your machine. More information on how you can get the most recent version of VS is found in Course Home.

Access the software at https://lab.devry.edu.STEP A: Create a New Web Site Project

In this step, we set up a new project and copy the files from the Week 1 iLab into it. This allows us to begin our lab this week where we left off last week and to add common elements to both pages.

To start this week’s project, create a new Empty Web Application project.

Copy the four files from last week’s iLab into the folder for this new project. Be careful not to move the files. We want to work on a copy of last week’s lab and leave the original untouched. The website folder should have the following files:

pgCheckOut.aspx
pgCheckOut.aspx.cs
pgConfirm.aspx
pgConfirm.aspx.cs
web.config
web.Debug.config ( optional: it depends on the version of Visual Studio you are using)
Set pgCheckOut.aspx as the start page and test your application. It should perform just as it did last week.

STEP B: Create a Master Page

In this step, we add a master page to our project.

Right-click on the name of your project and select Add => Add New Item …

Select Master Page as the type of item to add. Be sure that Place code in separate file. is checked.

Name the master page Web460Store.master and click OK to create the maser page for our site.

STEP C: Design Your Master Page

Our master page contains elements that we want common to all pages on our website, such as the header, the footer, and two side-by-side content areas. We mark areas that content pages can fill with the ContentPlaceHolder tag.

We also want a Label control that our content pages can modify to display messages directed to the user. Making the Label accessible to content pages requires editing the C# code for the master page, which we do in the next step.

View the source for Web460Store.master. We first set the title and a content area in the head of the master page. Make any changes necessary to the tag so that it matches the code below:

Next we create the page template in the of the master page. We use a table to assist with the layout. The first row of the table is the header for our page, displaying the company name and motto. It also contains the Label we will use to send messages to the user. The second table row has two content areas side by side for the website pages to place content and additional controls. The last row of the table is the page footer.

Edit the of your master page so that it looks like the following block of code:
STEP D: Expose the Label Control to Content Pages

In this step, we modify the C# code file for our master page, Web460Store.master.cs, to modify text displayed on the Label controls.

We need to establish set properties for the Label lblUserFeedback so that our content pages can change the message displayed to the user. Add the following method to the class Web460Store:
STEP E: Modify pgCheckOut to Use Our Master Page

In this step, we modify pgCheckOut.aspx to use the master page we created earlier. Since the master page contains , , and

tags, we do not need those in our content page, so we will be removing them as part of this step. We also must map the content on this page to the ContentPlaceHolder controls on the master page.

We begin by adding MasterPageFile=”~/Web460Store.master” to the page directive to indicate that this page references our master page:
So we have access controls the master page has exposed to us, such as the Label for user feedback. We need to add the following directive next:
We can then remove the , , and tags because we will be using the ones defined in the master page. Also remove the and

tags, but leave the content.

Next we map the body content to the two ContentPlaceHolder controls on the master page. The customer name, address, and phone number should be in the left content area (ContentPlaceHolder1) and the credit card information in the right content area ( ContentPlaceholder2 ). We bracket the content for each with an ASP.NET Content control.

Before the Label control for the customer’s first name, place the line:
Just after the line for the phone number TextBox control, close the first content area with the line:

On the next line, we begin the second content area the same way as the first begins:

We close the second content area at the end of the file, after the submit button:

At this point, the pgCheckOut.aspx design view should look similar to the following:

STEP F: Update the Master Page User Feedback Label

On pgCheckOut.aspx we want the user to enter billing information. We can modify the master page Label lblUserFeedback by updating the master page’s UserFeedBack property we set up earlier. So this happens when the page is loaded, making the Page_Load method in pgCheckOut.aspx.cs look like this:
STEP G: Modify pgConfirm to Use the Site Master Page

In this step, we transform the confirmation page pgConfirm to use the website master page in a similar way to how we modified pgCheckOut.

First, modify pgConfirm.aspx:

Remove unneeded HTML tags and modify the page directives as necessary.

The left content area should contain the customer’s name and address.

The right content area should contain the customer credit card information and the Submit Order button.

Remove the status label lblStatus because we will use the master page’s user feedback Label.

Then, because we removed lblStatus, we need to modify pgConfirm.aspx.cs:

When the page first loads, it should display the user feedback message:

Please confirm your billing information.

After the user presses the Submit Order button, the user feedback should be:

Your order has been submitted for processing.

If there is an exception thrown by PreviousPage.IsCrossPagePostBack, it should display the message:

Sorry, there was an error processing your request.

When the application is running, pgConfirm should appear similar to the following:

STEP H: Finalize Your Lab

Save your work!
Test it!
Make changes as appropriate until it works.
Remember to add comments for each step being performed.

Screenshots
pageCheckout

pageConfirm1

pageConfirm2

Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Payment Details

 

Lab Price = $15
Please feel free to send us your queries at: [email protected]
Payment Methods

Add to Cart

Buy Now

View Cart

Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on [email protected]
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.


Leave a Reply