title: Using JQuery Mobile and RadioButtonList and UpdatePanel a postback resets the Radio Button List
body: <p>I am using JQuery Mobile and a Radio Button List and Update Panel:</p>
  
  <p>When I click on a Checkbox (in a repeater) with this code:</p>
  
  <pre><code>    &lt;asp:CheckBox ID="chkbx" runat="server" Visible="false" OnCheckedChanged="cbx_CheckedChanged" AutoPostBack="true" /&gt;
  </code></pre>
  
  <p>I am sent back to the cbx_CheckedChanged event, which is intended.</p>
  
  <p>However the issue is the RadioButtonList code located below:</p>
  
  <pre><code>     &lt;asp:RadioButtonList ID="rdobtnlst" runat="server" OnDataBound="rdobtnlst_DataBound" EnableViewState="true"  /&gt;
  </code></pre>
  
  <p>gets set to the first choice, only if any option has been chosen.</p>
  
  <p>So here is an example: If there are 3 options in the radio button list and none are chosen and I click on the repeater checkbox item the page posts back and nothing happens to the radio button list. But if I chose the 2nd or 3rd option the radio button list will reset to the first choice every time the repeater checkbox item the page posts back.</p>
  
  <p>Here are a few items I can answer that should help:</p>
  
  <p>1.) No Master Page</p>
  
  <p>2.) .Net 4</p>
  
  <p>3.) Versions of jquery + mobile</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
  
  &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
  
  &lt;script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>4.) The Repeater has a Update Panel surrounding it:</p>
  
  <pre><code> &lt;asp:UpdatePanel ID="updpnl" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional"&gt;
         &lt;Triggers&gt;
             &lt;asp:AsyncPostBackTrigger ControlID="chkbx" EventName="CheckedChanged" /&gt;
         &lt;/Triggers&gt;
  &lt;ContentTemplate&gt; &lt;asp:Repeater ID="rptItems" runat="server" OnItemDataBound="rptItems_ItemDataBound" &gt;
      &lt;HeaderTemplate&gt;
          &lt;fieldset data-role="controlgroup" id="Items" data-mini="true"&gt;
      &lt;/HeaderTemplate&gt;
      &lt;ItemTemplate&gt;
         &lt;asp:CheckBox ID="chkbx" runat="server" Visible="false" OnCheckedChanged="cbx_CheckedChanged" AutoPostBack="true" /&gt;
          &lt;/ItemTemplate&gt;
      &lt;FooterTemplate&gt;
          &lt;/fieldset&gt;
      &lt;/FooterTemplate&gt;
  &lt;/asp:Repeater&gt;
  
  &lt;/ContentTemplate&gt;
  </code></pre>
  
  <p>  </p>
  
  <p>5.) Data does not load on Page_load, but from a public call to a method. There is a break point in the method and it never gets hit after the first time.</p>
  
  <p>6.) I also placed an update panel around the radio button list to test out the theory that it was making it post back and changing it, but it has no effect.</p>
  
  <p>7.) I wonder if there is something setting the radio button list to the first choice, but there is no code for that. I am not even sure how to do that.</p>
  
  <p>8.) I have a section of code that executes after the EndRequestHandler:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
      function EndRequestHandler(sender, args) {
          if (args.get_error() == undefined) {
              alertTest();
          }
      }
  
      function alertTest() {
          $(document).ready(function() 
          {
              //alert('reset')
  
              $('#MenuItemPanel').trigger('create'); 
  
  
              $('#MenuItemLoading').hide()
              $('#MenuItem').show()
  
          });
      }
  </code></pre>
  
  <p></p>
  
  <p>this code keeps the panel, that this list of items is inside, showing. It does execute after my post back as I placed an alert inside to verify.</p>
  
  <p>I know there is a lot here, but I wanted to though all of my ideas of what it might be or what I tried. </p>
  
  <p>Please ask as many questions about this as possible as it may help me identify the issue.</p>
  
  <p>[EDIT]
  I have gotten this to work when the radio button is on the actual page, but when I place it in a control it continues to refresh the parent page. I have put soooo many asp:updatepanels on the site that I am starting to wonder if jquery mobile works differently than I expected it to.</p>