
Partial Class _Default
    Inherits System.Web.UI.Page
 
  Protected Sub btnCalculate_Click(ByVal sender As Object,
                                   ByVal e As System.EventArgs) Handles btnCalculate.Click
    Dim cost As Double = CDbl(txtCost.Text)
    Dim percent As Double = CDbl(txtPercent.Text) / 100
    txtTip.Text = FormatCurrency(percent * cost)
  End Sub

 End Class
