Webform1.aspx (WebApplication0)

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication0.WebForm1"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

     <HEAD>

          <title>WebForm1</title>

          <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">

          <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">

          <meta name="vs_defaultClientScript" content="JavaScript">

          <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

     </HEAD>

     <body MS_POSITIONING="GridLayout">

          <form id="Form1" method="post" runat="server">

              <asp:Label id="lblName" style="Z-INDEX: 101; LEFT: 40px; POSITION: absolute; TOP: 48px" runat="server"

                   Width="56px" Height="32px">Name:</asp:Label>

              <asp:TextBox id="txtName" style="Z-INDEX: 102; LEFT: 120px; POSITION: absolute; TOP: 40px" runat="server"

                   Width="168px" Height="32px"></asp:TextBox>

              <asp:Label id="lblPayHr" style="Z-INDEX: 103; LEFT: 48px; POSITION: absolute; TOP: 112px" runat="server"

                   Width="112px" Height="24px">Pay Per Hour:</asp:Label>

              <asp:TextBox id="txtPayHr" style="Z-INDEX: 104; LEFT: 192px; POSITION: absolute; TOP: 104px"

                   runat="server" Width="104px" Height="32px"></asp:TextBox>

              <asp:Label id="lblHrsWork" style="Z-INDEX: 105; LEFT: 48px; POSITION: absolute; TOP: 152px"

                   runat="server" Width="128px" Height="32px">Hours Worked:</asp:Label>

              <asp:TextBox id="txtHrsWork" style="Z-INDEX: 106; LEFT: 192px; POSITION: absolute; TOP: 144px"

                   runat="server" Width="104px" Height="32px"></asp:TextBox>

              <asp:Button id="btnCalcPay" style="Z-INDEX: 107; LEFT: 408px; POSITION: absolute; TOP: 128px"

                   runat="server" Width="136px" Height="56px" Text="Calculate Pay"></asp:Button>

           <asp:Button id="btnClear" style="Z-INDEX: 108; LEFT: 408px; POSITION: absolute; TOP: 192px"

                   runat="server" Width="136px" Height="48px" Text="Clear"></asp:Button>

              <asp:Label id="lblPay" style="Z-INDEX: 109; LEFT: 152px; POSITION: absolute; TOP: 320px" runat="server"

                   Width="80px" Height="32px" ForeColor="Blue" BorderColor="Transparent" Font-Size="X-Large">Pay:</asp:Label>

              <asp:TextBox id="txtPay" style="Z-INDEX: 110; LEFT: 256px; POSITION: absolute; TOP: 320px" runat="server"

                   Width="128px" Height="32px" ForeColor="Blue" BorderColor="Blue" BorderStyle="Groove" Font-Size="Larger"></asp:TextBox>

          </form>

     </body>

</HTML>

Webform1.aspx (WebApplication1)

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

     <HEAD>

          <title>WebForm1</title>

          <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">

          <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">

          <meta content="JavaScript" name="vs_defaultClientScript">

          <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

     </HEAD>

     <body MS_POSITIONING="GridLayout">

          <form id="Form1" method="post" runat="server">

              <asp:CheckBoxList id="CheckBoxList1" AutoPostBack="True" style="Z-INDEX: 101; LEFT: 48px; POSITION: absolute; TOP: 120px"

                   runat="server" Width="248px">

                   <asp:ListItem Value="The dog">The dog</asp:ListItem>

                   <asp:ListItem Value="The cat">The cat</asp:ListItem>

                   <asp:ListItem Value="The bird">The bird</asp:ListItem>

                   <asp:ListItem Value="ran">ran</asp:ListItem>

                   <asp:ListItem Value="climbed">climbed</asp:ListItem>

                   <asp:ListItem Value="flew">flew</asp:ListItem>

                   <asp:ListItem Value="the fence.">around the fence.</asp:ListItem>

                   <asp:ListItem Value="the tree.">up the tree.</asp:ListItem>

                   <asp:ListItem Value="in the sky.">in the sky.</asp:ListItem>

              </asp:CheckBoxList>

              <asp:Button id="Button1" style="Z-INDEX: 103; LEFT: 496px; POSITION: absolute; TOP: 112px" runat="server"

                   Text="Clear"></asp:Button>

              <asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 64px; POSITION: absolute; TOP: 384px" runat="server"

                   Width="352px">Your sentence:</asp:Label></form>

     </body>

</HTML>

 

 

 

controlsweb/check1.aspx

<html>

<head><title>Make sentences using List Items</title>

<script runat="server">

Sub makeSentence(sender As Object, e As EventArgs)

dim ct

mySentence.Text="<p>Your sentence: </p>"

for ct =0 to phrases.Items.Count-1

if phrases.Items(ct).Selected then

mySentence.Text=mySentence.Text & " " & phrases.Items(ct).Text

end if

next

End Sub

</script>

<script runat="server">

Sub clear(Source As Object, e As EventArgs)

dim pt

for pt = 0 to phrases.Items.Count-1

if phrases.Items(pt).Selected then

phrases.Items(pt).Selected = False

end if

next

mySentence.Text=""

End Sub

</script>

</head>

<body>

<form runat="server">

<asp:CheckBoxList id="phrases" AutoPostBack="True"

TextAlign="Right" OnSelectedIndexChanged="makeSentence"

runat="server">

<asp:ListItem>The dog</asp:ListItem>

<asp:ListItem>The cat</asp:ListItem>

<asp:ListItem>The bird</asp:ListItem>

<asp:ListItem>The fish</asp:ListItem>

<asp:ListItem>The horse</asp:ListItem>

<asp:ListItem>ran</asp:ListItem>

<asp:ListItem>flew</asp:ListItem>

<asp:ListItem>swam</asp:ListItem>

<asp:ListItem>jumped</asp:ListItem>

<asp:ListItem>trotted</asp:ListItem>

<asp:ListItem>over the fence</asp:ListItem>

<asp:ListItem>onto the railing</asp:ListItem>

<asp:ListItem>into the rock</asp:ListItem>

<asp:ListItem>down the hill</asp:ListItem>

<asp:ListItem>into the tree</asp:ListItem>

<asp:ListItem>into the cage</asp:ListItem>

<asp:ListItem>up the stream</asp:ListItem>

</asp:CheckBoxList>

<asp:label id="mySentence" runat="server"/>

<br /><br />

<asp:Button id="clearButton" Text="Clear"

runat="server" OnClick="clear"/>

</form>

</body>

</html>