Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

visual studio design for calculator execute the code when calculate button is pressed and please help me to fix the code below. using System; using

visual studio design for calculator







execute the code when calculate button is pressed and please help me to fix the code below.

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

public partial class frmSalaryCalculator : System.Web.UI.Page { public object ErrorMessage { get; private set; }

protected void Page_Load(object sender, EventArgs e) { //Clear any error messages ErrorMessage.Text = "";

//Calculate your annual wage and display it decimal txtAnnualHours = 0;

//Check if your hourly wage is a valid decimal value if (Decimal.TryParse(txtAnnualHours.Text, out txtAnnualHours)) { //Calculate salary and store it within your Salary Textbox (wage times 40 hours per week and 52 weeks) txtPayRate.Text = (txtAnnualHours * 2080).ToString("C");

} else { //Display an error ErrorMessage.Text = "Please ensure your hourly wage is a proper decimal value."; } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago