{ "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 <\/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>