|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Radio buttons
Hai
I am doing my task in asp.net I have one Radio Gropu name Activity in this group i have 2 radio buttons named 1.srource ,2.Action. By default source is checked. my requirment is when ever user change the checked option from "source" to "action" i want to visible 2 buttons example "click" and "save". and again if user changed the checked option from "action" to "source" i want to hide the 2 buttons example "click" and "save". i dont find the click event in radio button. i tried with "CheckedChanged" event but its not working.i also tried withAutoPostBack=true option also. pl advice me. thanks sr MODERATOR EDIT - msrnivas, Please note that there is now a SEPARATE forum for .NET related posts. |
|
#2
|
|||
|
|||
|
You have to use the Panels for Hide the Buttons and then call the function OnSelectedIndexChanged on DropDownList Example is here
<%@ Page Language="VB" Debug="true" %> <script runat="server"> Sub Page_Load(Sender As Object,E AS EventArgs) panel1.Visible="false" End Sub Sub Sani(Sender As Object,E As EventArgs) panel1.Visible="true" End sub </script> <html> <body> <form runat="server"> <asp:RadioButtonList Group="group1" AutoPostBack="true" OnSelectedIndexChanged="Sani" runat="server"> <asp:ListItem Value="1" Text="Sajjad" Selected="true" /> <asp:ListItem Value="2" Text="Haider" runat="server" /> </asp:RadioButtonList> <asp:Panel id="panel1" runat="server"> <asp:Button id="but1" Text="Click" runat="server" /> <asp:Button id="but2" Text="Save" runat="server" /> </asp:Panel> </form> </body> </html> if you want further information then elobarate your problem more precisely |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Radio buttons |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|