,如果您使用的是asp網絡控制單選按鈕列表,那麼你可以做很多的變化時,他們是回發。您可以將該屬性設置爲SelectIndexChanged,因此無論何時它們發生更改時都會導致回發,然後您可以執行任何操作(驗證)。 例如:
<asp:radioButtonList
id="radio1" runat="server"
autoPostBack="true"
cellSpacing="20"
repeatColumns="3"
repeatDirection="horizontal"
RepeatLayout="table"
textAlign="right"
OnSelectedIndexChanged="radio_SelectedIndexChanged">
<asp:ListItem text="10pt" value="itsMe"/>
<asp:ListItem text="14pt" value="itsYou"/>
<asp:ListItem text="16pt" value="Neither"/>
</asp:radioButtonList>
在服務器上,你應該有
protected void radio_SelectedIndexChanged(object sender, EventArgs e)
{
//do whatever you want by calling the name of the radio id
//example
if(radio1.SelectedItem.Value=="(whatever you want to test)"
}
用什麼語言
? – Element 2009-01-26 19:53:37