<script  runat="server">
Sub submit(Source As Object, e As EventArgs)
if red.Checked=True then
   p1.InnerHtml="您喜欢红色!"
else
   p1.InnerHtml="您喜欢蓝色!"
end if
red.checked=false
blue.checked=false
End Sub
</script>

<html>
<body>

<form runat="server">
您喜欢哪种颜色?
<br />
<input id="red" type="checkbox" runat="server" /> 红色
<br />
<input id="blue" type="checkbox" runat="server" /> 蓝色
<br />
<input type="button" value="提交" OnServerClick="submit" runat="server"/>
<p id="p1" runat="server" />
</form>

</body>
</html>