asp.net - Need debugging hints: Visibility change on Postback works on one page but not another -


I have a webform with user controls that is a set of radio buttons on user control when the radio button changes A panel and a text box is shown or hides on which the radio button was selected.

I give you an example that works correctly:

testcontrol.aspx:

  & Amp; ATP: Radio Button List ID = "Option Radio Button" Autopostback = "Correct" On-Selected Index Changed = "Option RDiButton Listed Induct Change" Runat = "Server" & gt; & Lt; Asp: ListItem text = "show 1" & gt; & Lt; / Asp: ListItem & gt; & Lt; Asp: ListItem text = "Show 2" & gt; & Lt; / Asp: ListItem & gt; & Lt; / ASP: RadioButtonList & gt; & Lt; Asp: panel id = "panel1" cssClass = "panel1" runat = "server" & gt; & Lt; / Asp: Panel & gt; & Lt; ASP: Panel ID = "Panel 2" CssClass = "panel2" runat = "server" & gt; & Lt; / Asp: Panel & gt;  testcontrol.aspx.cs:   
  Secure zero option RDObutonlisted index (object sender, eventArgse E) {RadioButton Libil Bob = (radio button list) sender; Switch (Bob selected value) {Case "Show 1": Panel 1. Visual = true; Panel 2 View = valid; break; Case "Show 2": Panel 1. View = false; Panel 2 Visual = true; break; }}  

As I mentioned, it works properly in a test form panel 1 and panel 2 are displayed correctly, depending on which radio button selection is done.

I have another web page and user control with several other fields when this code is on that page, then I can move through the code behind the ChoicesRadioButtonList_SelectedIndexChanged event, but nothing it happens.

I'm in disadvantage for the next steps to debug it (scratches lack of restructuring the whole page). Can anyone find any suggestions for this?

Have you tried to use asap: ASP instead of multiviz: panel?

Instead of changing the visibility of many panels, you only need to use the set ActiveView to show the necessary view.


Comments