title: Textbox not showing on page
body: <p>I am trying to show a textbox after selecting an item from a populated listbox and clicking a button.
  After I click the button, the textbox should show up on the screen with the desired text however it never appears. The initial value of the visible property is set to false, then in the Code Behind it sets it to true and fills the text in the textbox. I debugged the code and the properties for visible and text are definitely being updated, but I don't know what the problem is.</p>
  
  <p>ASP.net</p>
  
  <pre><code>&lt;asp:FormView ID="FormSectionFormView" runat="server" DataKeyNames="FormSectionID" DataSourceID="FormSectionDataSource" RowStyle-VerticalAlign="NotSet"&gt;
  &lt;ItemTemplate&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;asp:Button ID="InsertButton"
              runat="server"
              Text="Insert" 
              OnClick="FormSectionButton_Click" 
              Font-Size="1.2em" /&gt;
              &lt;asp:Button ID="UpdateButton"
              runat="server"
              Text="Update"
              Font-Size="1.2em"/&gt;              
          &lt;/td&gt;
          &lt;td align="center"&gt;
              &lt;div style: align="center"&gt;
                  &lt;asp:Label ID="Label1"
                  runat="server"
                  Font-Bold="true"
                  Text="Section Instruction"
                  Font-Size="1.2em"&gt;
                      &lt;/asp:Label&gt;
              &lt;/div&gt;
              &lt;div style="width:800px; height:auto; overflow:auto"&gt;
                  &lt;asp:ListBox ID="SectionInstructionListBox"
                  DataSourceID="SectionInstructionSource"
                  runat="server"
                  DataTextField="Instruction"
                  Visible="True" /&gt;
              &lt;/div&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;div style="padding-top: 4em; width:800px"&gt;
                  &lt;asp:Label ID="Label5"
                  runat="server"
                  Font-Bold="true"
                  Text="Insert New Instruction"
                  Font-Size="1.2em"&gt;
                  &lt;/asp:Label&gt;              
                  &lt;asp:TextBox ID="SectionInstructionTextBox"
                  runat="server"
                  Width="800px" /&gt;
              &lt;/div&gt;
         &lt;/td&gt;       
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;
  
         &lt;/td&gt;
         &lt;td&gt;
             &lt;asp:TextBox runat="server" ID="updatetextbox" AutoPostBack="True" Visible="False"&gt;&lt;/asp:TextBox&gt;
         &lt;/td&gt;
     &lt;/tr&gt;
  &lt;/ItemTemplate&gt;
  &lt;/asp:FormView&gt;   
  </code></pre>
  
  <p>Code Behind</p>
  
  <pre><code>protected void FormSectionUpdateButton_Click(object sender, EventArgs e)
  {
     var ctrl = (Control)sender;
     var updatetextbox = (TextBox)ctrl.FindControl("updatetextbox");
     var instructionlistbox = (ListBox)ctrl.FindControl("SectionInstructionListBox");
     updatetextbox.Visible = true;
     updatetextbox.Text = instructionlistbox.SelectedItem.Text;
     FormSectionListView.DataBind();
  }
  </code></pre>
  
  <p>I am not doing much in the Page Load currently. I am just hiding the listview on page load, until I select other values.</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      _connection = DataAccess.SelfRef().GetConnection();
  
      var list = InstructionDropDown.SelectedValue;
      switch (list)
      {
  
          case "Form Section":
              FormSectionListBox.DataSourceID = "FormSectionDataSource";
              FormSectionListView.DataBind();
              RenderView(FormSectionListView, "hidden"); // hide listview on page load
              break;
  
      }
  
  }
  </code></pre>