{ "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-11T00:08:54-04:00", "answer_date": "2024-09-11 00:08:54", "is_docs_available": "", "is_excel_available": "", "is_pdf_available": "", "count_file_available": 0, "main_page": "student_question_view", "question_id": "10134208", "url": "\/study-help\/questions\/in-c-i-need-to-create-a-new-web-site-10134208", "question_creation_date_js": "2024-09-11T00:08:54-04:00", "question_creation_date": "Sep 11, 2024 12:08 AM", "meta_title": "[Solved] In C# I need to Create a new WEB SITE wit | SolutionInn", "meta_description": "Answer of - In C# I need to Create a new WEB SITE with the following:- Create a webpage that contains server side directives, code | SolutionInn", "meta_keywords": "c,create,new,web,site,-,webpage,server,side,directives,code,declaration", "question_title_h1": "In C# I need to Create a new WEB SITE with the following:- Create a webpage that contains server side directives, code declaration blocks, includes", "question_title": "In C# I need to Create a new WEB SITE with the", "question_title_for_js_snippet": "In C I need to Create a new WEB SITE with the following Create a webpage that contains server side directives, code declaration blocks, includes and controls Create a simple calculator the contains four labels, three textboxes, six buttons and a list box The first label enter first number The second label enter second number The third label should display the result Four of the buttons should be , , , The result textbox should be read only The startup page must be named index Display a message indicating cannot divide by when the user click and there is a zero the in the second box Prevent the user from entering text in the number fields Create the other two buttons store data The store data will store the results into array display data The display data will display the contents of the array (use 10 for the array size) I need some help with steps 9 11 on the server side for the C website Heres what I have so far for the C website and code behind Index aspx Welcome to the C Calculator Index aspx cs using System using System Collections Generic using System Linq using System Web using System Web UI using System Web UI WebControls namespace Calculator public partial class Index System Web UI Page double dec1stNum double dec2ndNum double decResult protected void Page Load(object sender, EventArgs e) protected void btnAdd Click(object sender, EventArgs e) Accepts input from txt1stNum txt2ndNum double TryParse(txt1stNum Text, out dec1stNum) double TryParse(txt2ndNum Text, out dec2ndNum) 'Adds the 1st 2nd numbers displays the results decResult dec1stNum dec2ndNum txtResult Text dec1stNum dec2ndNum decResult protected void btnSubtract Click(object sender, EventArgs e) Accepts input from txt1stNum txt2ndNum double TryParse(txt1stNum Text, out dec1stNum) double TryParse(txt2ndNum Text, out dec2ndNum) Subtracts the 2nd number from the 1st number displays the results decResult dec1stNum dec2ndNum txtResult Text dec1stNum dec2ndNum decResult protected void btnMultiply Click(object sender, EventArgs e) Accepts input from txt1stNum txt2ndNum double TryParse(txt1stNum Text, out dec1stNum) double TryParse(txt2ndNum Text, out dec2ndNum) Multiplies the 1st 2nd numbers displays the results decResult dec1stNum dec2ndNum txtResult Text dec1stNum X dec2ndNum decResult protected void btnDivide Click(object sender, EventArgs e) Accepts input from txt1stNum txt2ndNum double TryParse(txt1stNum Text, out dec1stNum) double TryParse(txt2ndNum Text, out dec2ndNum) Divides the 1st number by the 2nd number displays the results decResult dec1stNum dec2ndNum If dec2ndNum 0 Then txtResult Text dec1stNum dec2ndNum decResult End If ", "question_description": "

In C# I need to Create a new WEB SITE with the following:-<\/p>

  1. Create a webpage that contains server side directives, code declaration blocks, includes and controls.<\/li>
  2. Create a simple calculator the contains four labels, three textboxes, six buttons and a list box:<\/li>
  3. The first label = enter first number<\/li>
  4. The second label= enter second number<\/li>
  5. The third label = should display the result<\/li>
  6. Four of the buttons should be \"+\", \"-\", \"*\", \"\/\"<\/li>
  7. The result textbox should be read only<\/li>
  8. The startup page must be named index.<\/li>
  9. Display a message indicating cannot divide by when the user click \/ and there is a zero the in the second box<\/li>
  10. Prevent the user from entering text in the number fields<\/li>
  11. Create the other two buttons
    1. store data - The store data will store the results into array<\/li>
    2. display data - The display data will display the contents of the array (use 10 for the array size)<\/li> <\/ol> <\/li> <\/ol>

      <\/p>

      I need some help with steps 9 11 on the server side for the C# website.<\/p>

      <\/p>

      Heres what I have so far for the C# website and code behind:<\/p>

      Index.aspx:<\/p>

      <\/p>

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

      <\/p>

      <\/p>

      <\/p>

      <\/p>

      <\/p>

      <\/title><\/p> <p><\/head><\/p> <p><body><\/p> <p> <form id=\"form1\" runat=\"server\"><\/p> <p> <!--Defines the heading displayed--><\/p> <p> <h1>Welcome to the C# Calculator!<\/h1><\/p> <p> <div><\/p> <p> <\/div><\/p> <p> <!--Adds a label and a text box for the 1st number--><\/p> <p> <asp:label id=\"lbl1stNum\" runat=\"server\" text=\"Enter the first number:\"><\/asp:label><\/p> <p> <p><\/p> <p> <asp:textbox id=\"txt1stNum\" runat=\"server\" width=\"717px\"><\/asp:textbox><\/p> <p> <\/p><\/p> <p> <p><\/p> <p> <\/p> <p> <\/p><\/p> <p> <!--Adds a label and a text box for the 2nd number--><\/p> <p> <p><\/p> <p> <asp:label id=\"lbl2ndNum\" runat=\"server\" text=\"Enter the second number:\"><\/asp:label><\/p> <p> <\/p><\/p> <p> <p><\/p> <p> <asp:textbox id=\"txt2ndNum\" runat=\"server\" width=\"717px\"><\/asp:textbox><\/p> <p> <\/p><\/p> <p> <!--Adds the four buttons--><\/p> <p> <p><\/p> <p> <asp:button id=\"btnAdd\" runat=\"server\" text=\"+\" onclick=\"btnAdd_Click\" \/> <\/p> <p> <asp:button id=\"btnSubtract\" runat=\"server\" text=\"-\" onclick=\"btnSubtract_Click\" \/> <\/p> <p> <asp:button id=\"btnMultiply\" runat=\"server\" text=\"*\" onclick=\"btnMultiply_Click\" \/> <\/p> <p> <asp:button id=\"btnDivide\" runat=\"server\" text=\"\/\" onclick=\"btnDivide_Click\" \/><br \/><br \/><\/p> <p> <asp:button id=\"btnSaveData\" runat=\"server\" text=\"Save Data\" \/> <\/p> <p> <asp:button id=\"btnDisplayData\" runat=\"server\" text=\"Display Data\" \/><\/p> <p> <\/p><\/p> <p> <!--Adds a label and a text box for the results--><\/p> <p> <p><\/p> <p> <asp:label id=\"lblResult\" runat=\"server\" text=\"Result:\"><\/asp:label><\/p> <p> <\/p><\/p> <p> <asp:textbox id=\"txtResult\" runat=\"server\" readonly=\"True\" width=\"717px\"><\/asp:textbox><\/p> <p> <!--Adds a label and a list box for the previous operations--><\/p> <p> <p><\/p> <p> <asp:label id=\"lblPrevOps\" runat=\"server\" text=\"Previous Operations:\"><\/asp:label><\/p> <p> <\/p><\/p> <p> <asp:listbox id=\"lstPrevOps\" runat=\"server\" height=\"238px\" width=\"717px\"><\/asp:listbox><\/p> <p> <\/form><\/p> <p><\/body><\/p> <p><\/html><\/p> <p> <\/p> <p>Index.aspx.cs:<\/p> <p> <\/p> <p>using System;<\/p> <p>using System.Collections.Generic;<\/p> <p>using System.Linq;<\/p> <p>using System.Web;<\/p> <p>using System.Web.UI;<\/p> <p>using System.Web.UI.WebControls;<\/p> <p> <\/p> <p>namespace Calculator<\/p> <p>{<\/p> <p> public partial class Index : System.Web.UI.Page<\/p> <p> {<\/p> <p> double dec1stNum;<\/p> <p> double dec2ndNum;<\/p> <p> double decResult;<\/p> <p> <\/p> <p> protected void Page_Load(object sender, EventArgs e)<\/p> <p> {<\/p> <p> <\/p> <p> }<\/p> <p> <\/p> <p> protected void btnAdd_Click(object sender, EventArgs e)<\/p> <p> {<\/p> <p> \/\/Accepts input from txt1stNum & txt2ndNum<\/p> <p> double.TryParse(txt1stNum.Text, out dec1stNum);<\/p> <p> double.TryParse(txt2ndNum.Text, out dec2ndNum);<\/p> <p> \/\/'Adds the 1st & 2nd numbers & displays the results<\/p> <p> decResult = dec1stNum + dec2ndNum;<\/p> <p> txtResult.Text = dec1stNum + \" + \" + dec2ndNum + \" = \" + decResult;<\/p> <p> }<\/p> <p> <\/p> <p> protected void btnSubtract_Click(object sender, EventArgs e)<\/p> <p> {<\/p> <p> \/\/Accepts input from txt1stNum & txt2ndNum<\/p> <p> double.TryParse(txt1stNum.Text, out dec1stNum);<\/p> <p> double.TryParse(txt2ndNum.Text, out dec2ndNum);<\/p> <p> \/\/Subtracts the 2nd number from the 1st number & displays the results<\/p> <p> decResult = dec1stNum - dec2ndNum;<\/p> <p> txtResult.Text = dec1stNum + \" - \" + dec2ndNum + \" = \" + decResult;<\/p> <p> }<\/p> <p> <\/p> <p> protected void btnMultiply_Click(object sender, EventArgs e)<\/p> <p> {<\/p> <p> \/\/Accepts input from txt1stNum & txt2ndNum<\/p> <p> double.TryParse(txt1stNum.Text, out dec1stNum);<\/p> <p> double.TryParse(txt2ndNum.Text, out dec2ndNum);<\/p> <p> \/\/Multiplies the 1st & 2nd numbers & displays the results<\/p> <p> decResult = dec1stNum * dec2ndNum;<\/p> <p> txtResult.Text = dec1stNum + \" X \" + dec2ndNum + \" = \" + decResult;<\/p> <p> }<\/p> <p> <\/p> <p> protected void btnDivide_Click(object sender, EventArgs e)<\/p> <p> {<\/p> <p> \/\/Accepts input from txt1stNum & txt2ndNum<\/p> <p> double.TryParse(txt1stNum.Text, out dec1stNum);<\/p> <p> double.TryParse(txt2ndNum.Text, out dec2ndNum);<\/p> <p> \/\/Divides the 1st number by the 2nd number & displays the results<\/p> <p> decResult = dec1stNum \/ dec2ndNum;<\/p> <p> If dec2ndNum = 0;<\/p> <p> Then;<\/p> <p> <\/p> <p> txtResult.Text = dec1stNum + \" \/ \" + dec2ndNum + \" = \" + decResult;<\/p> <p> End If;<\/p> <p> }<\/p> <p> }<\/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-11 00:08:54", "see_more_questions_link": "\/study-help\/questions\/computer-science-operating-system-2022-August-09", "step_by_step_answer": "The Answer is in the image, click to view ...", "students_also_viewed": [ { "url": "\/study-help\/personal-financial-planning\/erin-purchased-a-life-insurance-policy-on-her-own-life-1994038", "description": "Erin purchased a life insurance policy on her own life. Her husband Mike is the beneficiary of the policy. Which of the following is not a necessary legal element of the contract? a. Offer and...", "stars": 0 }, { "url": "\/ebooks-an-online-book-retailer-has-two-operating-divisionscorporate-sales-and", "description": "E-books, an online book retailer, has two operating divisions-corporate sales and consumer sales-and two support divisions-human resources and information systems. Each sales division conducts...", "stars": 3 }, { "url": "\/study-help\/questions\/in-c-i-need-to-create-a-new-web-site-10134208", "description": "In C# I need to Create a new WEB SITE with the following:- Create a webpage that contains server side directives, code declaration blocks, includes and controls. Create a simple calculator the...", "stars": 3 }, { "url": "\/study-help\/questions\/state-an-upper-bound-on-the-running-time-of-the-7805107", "description": "State an upper bound on the running time of the program fragment using O( ) notation. Briefly justify your upper bound. State a lower bound on the running time of the program fragment using ( )...", "stars": 3 }, { "url": "\/study-help\/questions\/financial-accounting-215-journal-entries-and-the-equation-suppose-on-5415879", "description": "Financial Accounting: 2.1.5 Journal Entries and the Equation Suppose on January 1, 2014 Cardullo's purchases a new cash register for the shop and pays $800. ACCOUNTS CASH INVENTORY REVENUE ACCOUNTS...", "stars": 3 }, { "url": "\/study-help\/questions\/the-number-of-tubes-of-toothpaste-purchased-by-a-typical-4924071", "description": "The number of tubes of toothpaste purchased by a typical family is a random variable having a Poisson distribution with an average of 1.8 tubes per month. i. What is the probability that a typical...", "stars": 3 }, { "url": "\/study-help\/questions\/a-mix-of-three-materials-into-a-process-produces-09-4282317", "description": "A mix of three materials into a process produces 0.9 litres of a finished product, with 10% loss of input in the process. Standard material costs are as follows per 0.9 litres of output. Material $ X...", "stars": 3 }, { "url": "\/study-help\/questions\/complete-cogburns-december-31-year-4-balance-sheet-using-the-1915019", "description": "Complete Cogburn's December 31, Year 4, balance sheet using the information below. Each of the items may be reported as either a current or noncurrent liability. Enter the appropriate amounts in the...", "stars": 3 }, { "url": "\/study-help\/questions\/1-scroll-inc-a-whollyowned-subsidiary-of-pirn-inc-began-4452736", "description": "1. Scroll Inc., a wholly-owned subsidiary of Pirn, Inc. began operations on January 1, 2019. The following information is from the condensed 2019 income statements of Pirn and Scroll: Pirn Scroll...", "stars": 3 } ], "next_back_navigation": { "previous": "\/study-help\/questions\/this-question-is-from-data-structure-and-algorithms-subject-2-10134207", "next": "\/study-help\/questions\/mincly-receives-an-annual-salary-of-25500-plus-a-5-10134209" }, "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": "In C# I need to Create a new WEB SITE with the", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/in-c-i-need-to-create-a-new-web-site-10134208" } ], "skill_details": { "skill_id": "656", "skill_name": "Databases", "parent_id": "8" } }