152
Programming Languages for mis
are highlighted in Listing6.4. Note that an empty HTML tag (e.g., <br>) needs to
include “/” to avoid warning messages in ASP.NET. In line 13, the “&” sign is used
to join a string and a double type number.
Listing6.4: ASP.NET Program (Checkbox.aspx)
with HTML Checkbox Control
1 <%@ Page Language="VB" %>
2 <script runat="server">
3 Public Sub Page_Load()
-3 End Sub
4 Public Sub CheckOut(sender As Object, e As EventArgs)
5 Dim TotalPrice As Integer
6 label1.text = ""
7 if (chk1.checked) then
8 TotalPrice = TotalPrice + 10
-7 end if
9 if (chk2.checked) then
10 TotalPrice = TotalPrice + 20
-9 end if
11 if (chk3.checked) then
12 TotalPrice = TotalPrice + 30
-11 end if
13 label1.text="Total Price is: $" & TotalPrice ...