Code is below:
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Total, Service, Grade, Quarts As Decimal
Service = ListBox1.SelectedValue
Grade = DropDownList1.SelectedValue
Quarts = (TextBox1.Text * DropDownList1.SelectedValue)
Total = (Service + Grade + Quarts)
Response.Write(FormatCurrency(Service))
Label1.Text = FormatCurrency(Service, 2)
Response.Write(FormatCurrency(Grade))
Label2.Text = FormatCurrency(Grade, 2)
Response.Write(FormatCurrency(Quarts))
Label3.Text = FormatCurrency(Quarts, 2)
Response.Write(FormatCurrency(Total))
Label4.Text = FormatCurrency(Total, 2)
If Total = Service + Grade + Quarts Then
Label5.Text = "Thank you!"
End If
End Sub
End Class

New Topic/Question
Reply



MultiQuote




|