Link to home
Start Free TrialLog in
Avatar of pucko73
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.Visible=False">
                   
                </asp:ListItem>
            </asp:RadioButtonList>
            <asp:Panel ID="pnlMyPanel" runat="server">
                <asp:Label ID="lblMyLabel" runat="server" Text="SomeText"></asp:Label>
                <asp:TextBox ID="tbSomeTextBox" runat="server"></asp:TextBox>
                </asp:Panel>


            </asp:Panel>
Avatar of pucko73
pucko73

ASKER

I can also tell the the panel is  located inside a formview
Avatar of SAMIR BHOGAYTA
hi..

On the RadioButtonList, set the AutoPostBack attribute to true.
Avatar of pucko73

ASKER

I need to do some more? Right?
I'm new to this.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pucko73

ASKER

thanks
You are welcome - thanks for the points.