pucko73
asked on
Hide/show panel onClick on item in radiobuttonlist
Hello.
I have a radiobuttonlist with two items. if I check the last item I want to hide the panel with the label and textbox. If I press the first item I want to show them again.
How can I do that.
<asp:RadioButtonList ID="rbl1" runat="server">
<asp:ListItem Selected="True" Text="SomeText" Value="Value1">
</asp:ListItem>
<asp:ListItem Selected="False" Text="SomeOtherTex" Value="Value2" OnClick="pnlEntryMethod.Vi sible=Fals e">
</asp:ListItem>
</asp:RadioButtonList>
<asp:Panel ID="pnlMyPanel" runat="server">
<asp:Label ID="lblMyLabel" runat="server" Text="SomeText"></asp:Labe l>
<asp:TextBox ID="tbSomeTextBox" runat="server"></asp:TextB ox>
</asp:Panel>
</asp:Panel>
I have a radiobuttonlist with two items. if I check the last item I want to hide the panel with the label and textbox. If I press the first item I want to show them again.
How can I do that.
<asp:RadioButtonList ID="rbl1" runat="server">
<asp:ListItem Selected="True" Text="SomeText" Value="Value1">
</asp:ListItem>
<asp:ListItem Selected="False" Text="SomeOtherTex" Value="Value2" OnClick="pnlEntryMethod.Vi
</asp:ListItem>
</asp:RadioButtonList>
<asp:Panel ID="pnlMyPanel" runat="server">
<asp:Label ID="lblMyLabel" runat="server" Text="SomeText"></asp:Labe
<asp:TextBox ID="tbSomeTextBox" runat="server"></asp:TextB
</asp:Panel>
</asp:Panel>
hi..
On the RadioButtonList, set the AutoPostBack attribute to true.
On the RadioButtonList, set the AutoPostBack attribute to true.
ASKER
I need to do some more? Right?
I'm new to this.
I'm new to this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
You are welcome - thanks for the points.
ASKER