Question

In: Computer Science

Create an empty Web Site application named Bakery. Add a new Web page named Default.aspx to the application. Change the DOCUMENT object's Title property to Meyer's.


In Visual Basic

Create an empty Web Site application named Bakery. Add a new Web page named Default.aspx to the application. Change the DOCUMENT object's Title property to Meyer's. The application should allow the user to enter two items: the number of doughnuts ordered and the number of muffins ordered. The application should should display the total number of items ordered and the total sales amount, inlcuding a 5% sales tax. A doughnut costs .50; a muffin costs .75. Save the application, and then start and test it.

Solutions

Expert Solution

Here a new Web Application Project in VB is created using Visual Studio 2017 with name "Bakery".This application contains a web page with name "Default.aspx".Below are the details of this page.

Default.aspx :

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Bakery._Default" %>



<%-- title for the page --%>
Meyer's




Enter Number of doughnuts :
<%-- textbox for doughnuts --%>







Enter Number of muffins :


<%-- textbox for muffins --%>





<%-- button to submit --%>





<%--lable to display total --%>




*****************************

Default.aspx.vb :

Public Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub
'Submit button click
Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
'taking entered value of doughnuts
Dim doughnuts As Integer = Integer.Parse(txtDoughnuts.Text)
'taking muffins value
Dim muffins As Integer = Integer.Parse(txtMuffins.Text)
'total items
Dim totalItems As Integer = doughnuts + muffins
'calculating amount
Dim Amount As Double = (doughnuts * 0.5) + (muffins * 0.75)
'calculating tax
Dim tax As Double = (Amount * 5) / 100
'calculating total amount
Dim totalAmount = Amount + tax
'displaying details on the label
lblResult.Text = "Total Items :" & totalItems & "
Amount without Tax : " & Amount & "
Tax : " & tax & "
Total Amount : " & totalAmount
End Sub
End Class

======================================================

Output : Run application using F5 and will get the screen as shown below

Screen 1 :Default.aspx

Screen 2 :Enter items and click on calculate


Related Solutions

1. An HTML document that’s generated by a web application is a ________________________ web page. 2....
1. An HTML document that’s generated by a web application is a ________________________ web page. 2. An easy way to log the progress of an application in Chrome’s Console panel is to insert __________________ methods at critical points in the code. 3. The childNodes property of a DOM object returns a/an ______________________ of the child nodes for that object. 4. The ___________________ method of an array can be used to concatenate the elements of the array into a single string.​...
Web Projects If you are learning a web technology, you must create a new page that...
Web Projects If you are learning a web technology, you must create a new page that is web-accessible (use your individual burrow account) that includes a form with a field that allows the user to enter a number only. ● Create an input that allows a number to be entered. Only whole numbers should be allowed. ● Add a button below the input that says "Translate". ● When the button is clicked, it should grab the current number in the...
Treating the two web pages as two views of a Single Page Application (SPA), create the...
Treating the two web pages as two views of a Single Page Application (SPA), create the SPA with two views, one shows what the page in any one question displays and the other shows what the page in other questions  displays
Write a Python program to (a) create a new empty stack. Then, (b) add items onto...
Write a Python program to (a) create a new empty stack. Then, (b) add items onto the stack. (c) Print the stack contents. (d) Remove an item off the stack, and (e) print the removed item. At the end, (f) print the new stack contents:
For your final project, you are to create a two-page web application of your choice. ASP.NET...
For your final project, you are to create a two-page web application of your choice. ASP.NET : C# You must include the following items: At least 5 different standard server controls At least 2 validation controls At least 1 navigation control ~ one must navigate back and forth to each page One session state element Upon completion of your two-page web application, you will provide a two page report describing the functions of the web application as well as each...
Create a two-page mini pragmatic change plan: imagine you have to introduce a new dress code...
Create a two-page mini pragmatic change plan: imagine you have to introduce a new dress code in your team e.g.(white shirt policy). People so far have had no expectations set as per their dressing, some feel awkward and surprised. You are in charge as a leader to introduce and implement this change. For example: How can you encourage your team to go through the change? How can you make change fearless, how can you create clarity, how can you encourage...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT