{ "key_pair_value_system": true, "answer_rating_count": "", "question_feedback_html": { "html_star": "", "html_star_feedback": "" }, "answer_average_rating_value": "", "answer_date_js": "2024-09-08T07:03:35-04:00", "answer_date": "2024-09-08 07:03:35", "is_docs_available": null, "is_excel_available": null, "is_pdf_available": null, "count_file_available": 0, "main_page": "student_question_view", "question_id": "9616942", "url": "\/study-help\/questions\/i-have-done-all-the-above-parts-except-the-section-9616942", "question_creation_date_js": "2024-09-08T07:03:35-04:00", "question_creation_date": "Sep 08, 2024 07:03 AM", "meta_title": "[Solved] I have done all the above parts except th | SolutionInn", "meta_description": "Answer of - I have done all the above parts except the section in BOLD. Open the web application provided as Coding0504-Start. It | SolutionInn", "meta_keywords": "parts,section,bold,open,web,application,provided,coding0504-start,includes,aspx,code-,files", "question_title_h1": "I have done all the above parts except the section in BOLD. Open the web application provided as Coding0504-Start. It includes the aspx and code-", "question_title": "I have done all the above parts except the section in BOLD.", "question_title_for_js_snippet": "I have done all the above parts except the section in BOLD Open the web application provided as Coding0504 Start It includes the aspx and code behind files for the pages shown above, but the first page doesnt have the code for the Confirm button and the second page doesnt have the code for either of the buttons that are shown And neither page has the code for the label with the message thats displayed below the buttons Add the Confirm button to the Quotation page right after the Calculate button, and set its CssClass property to the btn and btn primary classes Add the Send Quotation and Return buttons to the Confirmation page, and set the appropriate CssClass values Also, set the properties for the Return button so it goes back to the Quotation page and doesnt cause validation On each page, add a label control below the buttons For each label, set the ID to lblMessage, the CssClass to text info, and the Text as shown above Test the application to see how its going, and make any adjustments Add the C code that makes the application work Create a Click event handler for the Confirm button of the Quotation page This button should redirect to the Confirmation page, which will display the quotation that is being confirmed by getting the data from session state To make this work, the Click event handler for the Calculate button of the Quotation page should save the sales price, discount amount, and total price in session state Now, add that code to that event handler When the user clicks the Confirm button on the Quotation page to go to the Confirmation page, the Load event handler for the Confirmation page should get the data from session state and display it as shown above Now, add that code to the Load event handler Add an event handler for the Click event of the Send Quotation button If the entries for this form are valid, this handler should use the data entered by the user to display a message below the buttons that says Quotation sent to at It should also set the values in session state to null MY CODE Confirm aspx cs using System using System Collections Generic using System Linq using System Web using System Web UI using System Web UI WebControls namespace Coding0504 public partial class Confirm System Web UI Page protected void Page Load(object sender, EventArgs e) if (PreviousPage null) TextBox txtSalesPrice (TextBox)PreviousPage FindControl( txtSalesPrice ) lblSalesPrice Text txtSalesPrice Text TextBox txtDiscountAmount (TextBox)PreviousPage FindControl( txDiscountAmount ) lblDiscountAmount Text txtDiscountAmount Text TextBox txtTotalPrice (TextBox)PreviousPage FindControl( txtTotalPrice ) lblTotalPrice Text txtTotalPrice Text Confirm aspx Confirm quotation Quotation confirmation Sales price Discount amount Total price Send confirmation to Name Email address Default aspx cs using System using System Collections Generic using System Linq using System Web using System Web UI using System Web UI WebControls namespace Coding0504 public partial class Default System Web UI Page protected void Page Load(object sender, EventArgs e) UnobtrusiveValidationMode UnobtrusiveValidationMode None protected void btnCalculate Click(object sender, EventArgs e) if (IsValid) decimal salesPrice Convert ToDecimal(txtSalesPrice Text) decimal discountPercent Convert ToDecimal(txtDiscountPercent Text) 100 decimal discountAmount salesPrice discountPercent decimal totalPrice salesPrice discountAmount lblDiscountAmount Text discountAmount ToString( c ) lblTotalPrice Text totalPrice ToString( c ) Session Add( txtSalesPrice , txtSalesPrice) Session Add( lblDiscountAmount , lblDiscountAmount) Session Add( lblTotalPrice , lblTotalPrice) protected void Confirm Click(object sender, EventArgs e) Response Redirect( Confirm aspx ) Default aspx Price quotation Price quotation Sales price 100 Discount percent 20 Discount amount Total price", "question_description": "

I have done all the above parts except the section in BOLD.<\/p>

Open the web application provided as Coding0504-Start. It includes the aspx and code- behind files for the pages shown above, but the first page doesnt have the code for the Confirm button and the second page doesnt have the code for either of the buttons that are shown. And neither page has the code for the label with the message thats displayed below the buttons.<\/p>

Add the Confirm button to the Quotation page right after the Calculate button, and set its CssClass property to the btn and btn-primary classes.<\/p>

Add the Send Quotation and Return buttons to the Confirmation page, and set the appropriate CssClass values. Also, set the properties for the Return button so it goes back to the Quotation page and doesnt cause validation.<\/p>

On each page, add a label control below the buttons. For each label, set the ID to lblMessage, the CssClass to text-info, and the Text as shown above.<\/p>

Test the application to see how its going, and make any adjustments.<\/p>

Add the C# code that makes the application work<\/strong><\/p>

Create a Click event handler for the Confirm button of the Quotation page. This button should redirect to the Confirmation page, which will display the quotation that is being confirmed by getting the data from session state.<\/strong><\/p>

To make this work, the Click event handler for the Calculate button of the Quotation page should save the sales price, discount amount, and total price in session state. Now, add that code to that event handler.<\/strong><\/p>

When the user clicks the Confirm button on the Quotation page to go to the Confirmation page, the Load event handler for the Confirmation page should get the data from session state and display it as shown above. Now, add that code to the Load event handler.<\/strong><\/p>

Add an event handler for the Click event of the Send Quotation button. If the entries for this form are valid, this handler should use the data entered by the user to display a message below the buttons that says: Quotation sent to at . It should also set the values in session state to null. <\/strong><\/p>

<\/p>

<\/p>

<\/p>

MY CODE<\/strong><\/p>

<\/p>

Confirm.aspx.cs<\/p>

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;<\/p>

namespace Coding0504 { public partial class Confirm : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (PreviousPage != null) { TextBox txtSalesPrice = (TextBox)PreviousPage.FindControl(\"txtSalesPrice\"); lblSalesPrice.Text = txtSalesPrice.Text;<\/p>

TextBox txtDiscountAmount = (TextBox)PreviousPage.FindControl(\"txDiscountAmount\"); lblDiscountAmount.Text = txtDiscountAmount.Text;<\/p>

TextBox txtTotalPrice = (TextBox)PreviousPage.FindControl(\"txtTotalPrice\"); lblTotalPrice.Text = txtTotalPrice.Text; }<\/p>

<\/p>

} } }<\/p>

<\/p>

<\/p>

Confirm.aspx<\/p>

<\/p>

<\/p>

<%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"Confirm.aspx.cs\" Inherits=\"Coding0504.Confirm\" %><\/p>

<\/p>

Confirm quotation<\/title> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/> <script src=\"Scripts\/jquery-1.9.1.min.js\"><\/script> <script src=\"Scripts\/bootstrap.min.js\"><\/script> <link href=\"Content\/bootstrap.min.css\" rel=\"stylesheet\" \/> <link href=\"Content\/site.css\" rel=\"stylesheet\" \/> <\/head> <body> <form id=\"form1\" runat=\"server\"><\/p> <p> <main><\/p> <p> <h1>Quotation confirmation<\/h1><\/p> <p> <div> <label>Sales price<\/label> <asp:label id=\"lblSalesPrice\" runat=\"server\" cssclass=\"col-sm-3 bold\"><\/asp:label> <\/div><\/p> <p> <div> <label>Discount amount<\/label> <asp:label id=\"lblDiscountAmount\" runat=\"server\" cssclass=\"col-sm-3 bold\"><\/asp:label> <\/div><\/p> <p> <div> <label>Total price<\/label> <asp:label id=\"lblTotalPrice\" runat=\"server\" cssclass=\"col-sm-3 bold\"><\/asp:label> <\/div> <\/p> <p> <div> <h3>Send confirmation to<\/h3> <\/div> <div> <label>Name<\/label> <div> <asp:textbox id=\"txtName\" runat=\"server\" cssclass=\"form-control\"><\/asp:textbox> <\/div> <div> <asp:requiredfieldvalidator id=\"RequiredFieldValidator1\" runat=\"server\" controltovalidate=\"txtName\" display=\"Dynamic\" errormessage=\"Required\" cssclass=\"text-danger\"><\/asp:requiredfieldvalidator> <\/div> <\/div> <div> <label>Email address<\/label> <div> <asp:textbox id=\"txtEmail\" runat=\"server\" cssclass=\"form-control\"><\/asp:textbox> <\/div> <div> <asp:requiredfieldvalidator id=\"RequiredFieldValidator2\" runat=\"server\" controltovalidate=\"txtEmail\" display=\"Dynamic\" errormessage=\"Required\" cssclass=\"text-danger\"><\/asp:requiredfieldvalidator> <\/div> <\/div> <\/p> <p> <%-- Quotation and Return buttons --%> <div> <div> <%-- buttons go here --%><\/p> <p> <asp:button id=\"Quotation\" runat=\"server\" text=\"Send Quotation\" cssclass=\"btn btn-primary\"\/> <asp:button id=\"Return\" runat=\"server\" text=\"Return\" causesvalidation=\"False\" postbackurl=\"\/Default.aspx\" cssclass=\"btn btn-primary\" \/> <\/div> <\/div> <%-- message label --%> <div> <div> <%-- message label goes here --%> <p><\/p> <p> <asp:label id=\"lblMessage\" runat=\"server\" text=\"Click the Send Quontation button to send the quotation via email\"><\/asp:label> <\/p><\/p> <p> <\/div> <\/div><\/p> <p> <\/main><\/p> <p> <\/form> <\/body> <\/html><\/p> <p> <\/p> <p> <\/p> <p>Default.aspx.cs<\/p> <p> <\/p> <p> <\/p> <p> <\/p> <p>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;<\/p> <p>namespace Coding0504 { public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { UnobtrusiveValidationMode = UnobtrusiveValidationMode.None; }<\/p> <p> protected void btnCalculate_Click(object sender, EventArgs e) { if (IsValid) { decimal salesPrice = Convert.ToDecimal(txtSalesPrice.Text); decimal discountPercent = Convert.ToDecimal(txtDiscountPercent.Text) \/ 100;<\/p> <p> decimal discountAmount = salesPrice * discountPercent; decimal totalPrice = salesPrice - discountAmount;<\/p> <p> lblDiscountAmount.Text = discountAmount.ToString(\"c\"); lblTotalPrice.Text = totalPrice.ToString(\"c\");<\/p> <p> Session.Add(\"txtSalesPrice\", txtSalesPrice); Session.Add(\"lblDiscountAmount\", lblDiscountAmount); Session.Add(\"lblTotalPrice\", lblTotalPrice); } }<\/p> <p> protected void Confirm_Click(object sender, EventArgs e) {<\/p> <p> Response.Redirect(\"\/Confirm.aspx\"); } } } <\/p> <p> <\/p> <p> <\/p> <p>Default.aspx<\/p> <p> <\/p> <p><%@ Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"Default.aspx.cs\" Inherits=\"Coding0504.Default\" %><\/p> <p><!DOCTYPE html><\/p> <p><html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"> <head runat=\"server\"> <title>Price quotation<\/title> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/> <script src=\"Scripts\/jquery-1.9.1.min.js\"><\/script> <script src=\"Scripts\/bootstrap.min.js\"><\/script> <link href=\"Content\/bootstrap.min.css\" rel=\"stylesheet\" \/> <link href=\"Content\/site.css\" rel=\"stylesheet\" \/> <\/head> <body> <form id=\"form1\" runat=\"server\"><\/p> <p> <main><\/p> <p> <h1>Price quotation<\/h1><\/p> <p> <div> <label>Sales price<\/label> <div> <asp:textbox id=\"txtSalesPrice\" runat=\"server\" cssclass=\"form-control bold\">100<\/asp:textbox> <\/div> <div> <asp:requiredfieldvalidator id=\"RequiredFieldValidator1\" runat=\"server\" controltovalidate=\"txtSalesPrice\" display=\"Dynamic\" errormessage=\"Required\" cssclass=\"text-danger\"><\/asp:requiredfieldvalidator> <asp:rangevalidator id=\"RangeValidator1\" runat=\"server\" controltovalidate=\"txtSalesPrice\" display=\"Dynamic\" errormessage=\"Must be from 10 to 1000\" cssclass=\"text-danger\" maximumvalue=\"1000\" minimumvalue=\"10\" type=\"Double\"><\/asp:rangevalidator> <\/div> <\/div><\/p> <p> <div> <label>Discount percent<\/label> <div> <asp:textbox id=\"txtDiscountPercent\" runat=\"server\" cssclass=\"form-control\">20<\/asp:textbox> <\/div> <div> <asp:requiredfieldvalidator id=\"RequiredFieldValidator2\" runat=\"server\" controltovalidate=\"txtDiscountPercent\" display=\"Dynamic\" errormessage=\"Required\" cssclass=\"text-danger\"><\/asp:requiredfieldvalidator> <asp:rangevalidator id=\"RangeValidator2\" runat=\"server\" controltovalidate=\"txtDiscountPercent\" display=\"Dynamic\" errormessage=\"Must be from 10 to 50\" cssclass=\"text-danger\" maximumvalue=\"50\" minimumvalue=\"10\" type=\"Double\"><\/asp:rangevalidator> <\/div> <\/div><\/p> <p> <div> <label>Discount amount<\/label> <asp:label id=\"lblDiscountAmount\" runat=\"server\" cssclass=\"col-sm-3 bold\"><\/asp:label> <\/div><\/p> <p> <div> <label>Total price<\/label> <asp:label id=\"lblTotalPrice\" runat=\"server\" cssclass=\"col-sm-3 bold\"><\/asp:label> <\/div> <\/p> <p> <%-- Calculate and Confirm buttons --%> <div> <div> <asp:button id=\"btnCalculate\" runat=\"server\" text=\"Calculate\" cssclass=\"btn btn-primary\" onclick=\"btnCalculate_Click\" \/> <%-- confirm button goes here --%><\/p> <p> <asp:button id=\"Confirm\" postbackurl=\"\/Confirm.aspx\" runat=\"server\" text=\"Confirm\" cssclass=\"btn btn-primary\" onclick=\"Confirm_Click\"\/><\/p> <p> <\/p> <p> <\/div> <\/div> <%-- message label --%> <div> <div> <%-- message label goes here --%> <asp:label id=\"lblMessage\" runat=\"server\" text=\"Enter price and discount and click Calculate\"><\/asp:label><\/p> <p> <\/div> <\/div> <\/p> <p> <\/main><\/p> <p> <\/form> <\/body> <\/html><\/p> <p> <\/p>", "transcribed_text": "", "related_book": { "title": null, "isbn": null, "edition": null, "authors": null, "cover_image": null, "uri": null, "see_more_uri": "" }, "free_related_book": { "isbn": "", "uri": "", "name": "", "edition": "" }, "question_posted": "2024-09-08 07:03:35", "see_more_questions_link": "\/study-help\/questions\/computer-science-computer-network-2023-February-20", "step_by_step_answer": "The Answer is in the image, click to view ...", "students_also_viewed": [ { "url": "\/study-help\/modern-mathematical-statistics-with-applications\/84-let-x-the-time-in-101-weeks-from-1989608", "description": "84. Let X the time (in 101 weeks) from shipment of a defective product until the customer returns the product. Suppose that the minimum return time is g 3.5 and that the excess X 3.5 over the...", "stars": 0 }, { "url": "\/alpha-issues-a-negotiable-check-to-beta-payable-to-the", "description": "Alpha issues a negotiable check to Beta payable to the order of Beta in payment of an obligation Alpha owed Beta. Beta delivers the check to Gamma without indorsing it in exchange for one hundred...", "stars": 3 }, { "url": "\/study-help\/questions\/chapter17-review-the-workinprocess-inventory-general-ledger-account-you-prepared-9945105", "description": "chapter17 Review the Work-In-Process Inventory general ledger account you prepared in Requirement 2 Reference Learning Stars Schedule of Cost of Goods Manufactured Month Ended June 30, 2018 Beginning...", "stars": 3 }, { "url": "\/study-help\/questions\/choices-are-online-batch-or-neither-2-5-pts-9669875", "description": "Choices are Online, Batch or Neither 2 \/ 5 pts Question 16 Select from the option list provided whether each control listed below is an online or batch control. Each choice may be used once, more...", "stars": 3 }, { "url": "\/study-help\/questions\/answer-the-following-financial-questions-in-microsoft-excel-the-finance-1425406", "description": "Answer the following Financial questions in Microsoft Excel. The Finance concept of Stocks and Bonds Valuation needs to applied, when answering the questions. Q 1 JW Corp has paid a dividend of...", "stars": 3 }, { "url": "\/study-help\/questions\/1-self-assessment-you-have-prepared-handouts-several-charts-and-1427109", "description": "1. Self Assessment You have prepared handouts, several charts, and a short video clip to support your speech. What steps should you take to make sure your presentation is effective? 2. Ethics...", "stars": 3 }, { "url": "\/study-help\/questions\/while-reviewing-you-noticed-an-error-in-alexs-pricing-analysis-2137077", "description": "1. while reviewing, you noticed an error in alex's pricing analysis that may result in discrepancies between stated costs to customer and actual costs that customers will be charged. how would you...", "stars": 3 }, { "url": "\/study-help\/questions\/daryl-was-talking-with-friends-at-a-restaurant-after-work-1427583", "description": "Daryl was talking with friends at a restaurant after work. He told them that he had been thinking of making a career change for a while, so he's finally enrolled himself into an allied health...", "stars": 3 }, { "url": "\/study-help\/questions\/childhood-disorders-psy431ol01-case-study-project-for-this-assignment-1427659", "description": "Childhood Disorders - PSY-431-OL01 Case Study Project: For this assignment, you will read a case study and offer diagnostic impressions and treatment suggestions. Directions: Based on the information...", "stars": 3 } ], "next_back_navigation": { "previous": "\/study-help\/questions\/sthilaire-corporation-is-working-on-its-direct-labor-budget-for-9616941", "next": "\/study-help\/questions\/prevention-costs-include-all-of-the-following-except-select-one-9616943" }, "breadcrumbs": [ { "name": "Study help", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers" }, { "name": "Computer Science", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers\/computer-science" }, { "name": "Databases", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/computer-science-databases" }, { "name": "I have done all the above parts except the section in BOLD.", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/i-have-done-all-the-above-parts-except-the-section-9616942" } ], "skill_details": { "skill_id": "656", "skill_name": "Databases", "parent_id": "8" } }