This is my first time using C# (and I'm not very good with Java either sadly) so I'm a bit confused :/


I know that the part at the end - " String returnString = calculatePay(hourlyRate, hours);
Response.Write(pay); " - is wrong, but I'm not sure what's supposed to go there.


Any help would be greatly appreciated....and if there's anything else that's wrong please feel free to help. If I try to run it, it only gives me the error about the last part, so I don't know if anything really works. Thanks!


Code:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>


<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="payrollForm" runat="server" action="Default.aspx" method="post">
    <div>
    <p><strong>Please enter your hourly pay rate.</strong></p>
    <p><input type="text" name="payRate" /></p>
    <br />
    <p><strong>Please enter the number of hours worked.</strong></p>
    <p><input type="text" name="hoursWorked" /></p>
    </div>
    </form>
<script runat="server">
    double hourlyRate;
    double hours;
    double pay;
    double temp_Pay;
    
    double OT_Payrate;
    double overTimeHours;
    double overTimePay;
    
    
    String calculatePay(double hourlyRate, double hours)
    {
        if(hours < 0)
        {
            return "Hours must be greater than or equal to 0!";
        }
        else if(hours <= 40)
        {
            pay = hours * hourlyRate;
            return "Your total pay is: " + pay;
        }
        else if(hours > 40)
        {
            OT_Payrate = hourlyRate * 1.5;
            overTimeHours = hours - 40;
            overTimePay = overTimeHours * OT_Payrate;
            temp_Pay = hours * hourlyRate;
            pay = temp_Pay + overTimePay;
            return "Your total pay is: " + pay;
        }
    }
</script>            
<%
    String returnString = calculatePay(hourlyRate, hours);
    Response.Write(pay);    
%>
</body>
</html>