ch08-03-02.aspx

来自「这是一个asp.net的全文教程.里面还有数据库的数据.对初学者有很大的帮助」· ASPX 代码 · 共 45 行

ASPX
45
字号
<Html>
<Head>
<Title>Ch08-03-02.aspx Web控件的RadioButton控件</Title>
<Script Language="VB" Runat="Server" >
	' 使用者按下“输入”按钮的事件处理程序
	Sub Button_Click(obj As Object, e As EventArgs)
		Dim strA As String
		' 检查是否选择信用卡交易
		If CreditCard.Checked = True Then
			strA = strA & "选择信用卡交易<Br>"
		End If
		' 检查是否选择邮政电汇
		If Postal.Checked = True Then
			strA = strA & "选择邮政电汇<Br>"
		End If
		' 检查是否选择ATM转账
		If ATM.Checked = True Then
			strA = strA & "选择ATM转账<Br>"
		End If
		' 检查是否选择货到收现
		If Other.Checked = True Then
			strA = strA & "选择货到收现<Br>"
		End If
		Show1.InnerHtml = strA
	End Sub
</Script>
</Head>
<Body>
<Form Runat="Server">
请选择付款方式:<Br>
<asp:RadioButton ID="CreditCard" Text="信用卡交易"
		GroupName="Payment" Runat="Server" /><Br>
<asp:RadioButton ID="Postal" Text="邮政电汇"
		GroupName="Payment" Runat="Server" /><Br>
<asp:RadioButton ID="ATM" Text="ATM转账"
		GroupName="Payment" Runat="Server" /><Br>
<asp:RadioButton ID="Other" Text="货到收现"
		GroupName="Payment" Runat="Server" /><Br>
<Input Type="Button" ID="Button" Value="确定" Runat="Server"
    		OnServerClick="Button_Click" /><P>
</Form>
<Span ID="Show1" Runat="Server"></Span>
</Body>
</Html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?