Public Class Trace Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents Image1 As System.Web.UI.WebControls.Image Protected WithEvents Image2 As System.Web.UI.WebControls.Image Protected WithEvents Image3 As System.Web.UI.WebControls.Image Protected WithEvents Image4 As System.Web.UI.WebControls.Image Protected WithEvents Image5 As System.Web.UI.WebControls.Image Protected WithEvents Image6 As System.Web.UI.WebControls.Image Protected WithEvents IMG1 As System.Web.UI.HtmlControls.HtmlImage Protected WithEvents Panel1 As System.Web.UI.WebControls.Panel Protected WithEvents Img2 As System.Web.UI.HtmlControls.HtmlImage Protected WithEvents Order As System.Web.UI.WebControls.Label Protected WithEvents Description1 As System.Web.UI.WebControls.Label Protected WithEvents Description2 As System.Web.UI.WebControls.Label Protected WithEvents Description3 As System.Web.UI.WebControls.Label Protected WithEvents Description4 As System.Web.UI.WebControls.Label Protected WithEvents Description5 As System.Web.UI.WebControls.Label Protected WithEvents Description6 As System.Web.UI.WebControls.Label Protected WithEvents Price1 As System.Web.UI.WebControls.Label Protected WithEvents Price2 As System.Web.UI.WebControls.Label Protected WithEvents Price3 As System.Web.UI.WebControls.Label Protected WithEvents Price4 As System.Web.UI.WebControls.Label Protected WithEvents Price5 As System.Web.UI.WebControls.Label Protected WithEvents Price6 As System.Web.UI.WebControls.Label Protected WithEvents Model1 As System.Web.UI.WebControls.Label Protected WithEvents Model2 As System.Web.UI.WebControls.Label Protected WithEvents Model3 As System.Web.UI.WebControls.Label Protected WithEvents Model4 As System.Web.UI.WebControls.Label Protected WithEvents Model5 As System.Web.UI.WebControls.Label Protected WithEvents Model6 As System.Web.UI.WebControls.Label Protected WithEvents Button1 As System.Web.UI.WebControls.Button Protected WithEvents Button2 As System.Web.UI.WebControls.Button Protected WithEvents Button3 As System.Web.UI.WebControls.Button Protected WithEvents Button4 As System.Web.UI.WebControls.Button Protected WithEvents Button5 As System.Web.UI.WebControls.Button Protected WithEvents Button6 As System.Web.UI.WebControls.Button Protected WithEvents Quantity As System.Web.UI.WebControls.TextBox Protected WithEvents HyperLink1 As System.Web.UI.WebControls.HyperLink 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Dim Total As Integer Public Function GetTotal(ByVal Price As String) As String Total = CInt(Quantity.Text) * CInt(Price) Order.Text = "Total Cost: $ " & Total.ToString Trace.Write("Price", Price) Trace.Write("Quantity", Quantity.Text) Trace.Warn("Total", Total.ToString) Return Total End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click GetTotal(Price1.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click GetTotal(Price2.Text) End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click GetTotal(Price3.Text) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click GetTotal(Price4.Text) End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click GetTotal(Price5.Text) End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click GetTotal(Price6.Text) End Sub End Class