G
Guest
How do I create client events for a radio button?
Do I have to switch to HTML controls?
The code below doesn't work.
<body MS_POSITIONING="FlowLayout">
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
RadioButton1.Attributes.add("onchange","javascript:alert('Onchanged
happened'")
end sub
</script>
<form id="Form1" method="post" runat="server">
<asp:RadioButton id="RadioButton1" runat="server" GroupName="sort"
Text="Ascending"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" runat="server" GroupName="sort"
Text="Descending"></asp:RadioButton>
</form>
</body>
Do I have to switch to HTML controls?
The code below doesn't work.
<body MS_POSITIONING="FlowLayout">
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
RadioButton1.Attributes.add("onchange","javascript:alert('Onchanged
happened'")
end sub
</script>
<form id="Form1" method="post" runat="server">
<asp:RadioButton id="RadioButton1" runat="server" GroupName="sort"
Text="Ascending"></asp:RadioButton>
<asp:RadioButton id="RadioButton2" runat="server" GroupName="sort"
Text="Descending"></asp:RadioButton>
</form>
</body>