<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication5.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.
<script language="vb" runat="server">
dim strtemp as string
Private Sub Button1_Click(sender As System.Object,e As System.EventArgs)
strtemp="您好,您选择了:<br>"
if chk1.Checked then strtemp=strtemp & "跑步<br>"
if chk2.Checked then strtemp=strtemp & "体操<br>"
Label2.Text=strtemp
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<asp:CheckBox id="chk1" style="Z-INDEX: 101; LEFT: 32px; POSITION: absolute; TOP: 48px" runat="server"
Width="120px" Height="16px" Text="跑步"></asp:CheckBox>
<asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 40px; POSITION: absolute; TOP: 16px" runat="server"
Width="192px" Height="24px">请告诉我你最喜爱的运动是</asp:Label>
<asp:CheckBox id="chk2" style="Z-INDEX: 103; LEFT: 32px; POSITION: absolute; TOP: 88px" runat="server"
Width="112px" Height="8px" Text="体操"></asp:CheckBox>
<asp:Button id="Button1" style="Z-INDEX: 104; LEFT: 40px; POSITION: absolute; TOP: 128px" runat="server"
Width="88px" OnClick="Button1_Click" Text="提交"></asp:Button>
<asp:Label id="Label2" style="Z-INDEX: 105; LEFT: 32px; POSITION: absolute; TOP: 168px" runat="server"
Width="216px" Height="24px"></asp:Label>
</FONT>
</form>
</body>
</HTML>