|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP.NET Programming with Microsoft’s ASP.NET Web Matrix
ASP.NET Programming with Microsoft’s ASP.NET Web Matrix
Like the year 2000, the introduction of Microsoft’s .NET initiative was met by many with mixed emotions: skepticism, excitement, and a fear of the end of civilization as we know it. Alright, so I can’t honestly say that I remember seeing anyone buying survivalist handbooks due to the introduction of .NET. Still, its introduction was a pretty monumental event, even outside of the Microsoft development community. Read the full article here. Discuss this article in this thread. |
|
#2
|
|||
|
|||
|
Interesting....but I never really cared for Web Matrix.
|
|
#3
|
|||
|
|||
|
I followed the tutorial but for some reason, I can't get the _Click event to populate the results label. I can't even verify that the event even fires. Would someone please tell me where I went awry?
TIA, ASoong <%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender as Object, e as EventArgs) Response.Write("<B>How much would you have to pay for this beautiful car?</B>") End Sub Sub performCalc_Click(sender As Object, e As EventArgs) 'Specify Constant values Const INTEREST_CALCS_PER_YEAR as Integer = 12 Const PAYMENTS_PER_YEAR as Integer = 12 'Create variables to hold the values entered by the user Dim P as Double = autoLoanAmount.Text Dim r as Double = rate.Text / 100 Dim t as Double = autoLoanLength.Text Dim ratePerPeriod as Double ratePerPeriod = r/INTEREST_CALCS_PER_YEAR Dim payPeriods as Integer payPeriods = t * PAYMENTS_PER_YEAR Dim annualRate as Double annualRate = Math.Exp(INTEREST_CALCS_PER_YEAR * Math.Log(1+ratePerPeriod)) - 1 Dim intPerPayment as Double intPerPayment = (Math.Exp(Math.Log(annualRate+1)/payPeriods) - 1) * payPeriods 'Now, compute the total cost of the loadn Dim intPerMonth as Double = intPerPayment / PAYMENTS_PER_YEAR Dim costPerMonth as Double costPerMonth = P * intPerMonth/(1-Math.Pow(intPerMonth+1,-payPeriods)) 'Now display the results in the label Web Control results.Text = "Your mortgage payment per month is $" & costPerMonth End Sub </script> <html> <head> </head> <body> <form runat="server"> <img src="mast_logo.gif" /> <p> </p> <p> Value of car: <asp:TextBox id="autoLoanAmount" runat="server" Width="129px"></asp:TextBox> </p> <p> Interest Rate: <asp:TextBox id="rate" runat="server"></asp:TextBox> </p> <p> Auto Loan Length: <asp:TextBox id="autoLoanLength" runat="server"></asp:TextBox> </p> <p> <asp:Button id="performCalc" runat="server" Text="Figure out Your Monthly Payments"></asp:Button> </p> <p> <asp:Label id="results" runat="server" width="272px" forecolor="Black" font-bold="True" tooltip="Hello World!"></asp:Label> </p> <p> </p> <p> </p> </form> </body> </html> |
![]() |
| Viewing: ASP Free Forums > Other > Development Articles > ASP.NET Programming with Microsoft’s ASP.NET Web Matrix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|