title: Webforms: submitdisabledcontrols=true keeps some controls disabled
body: <p>So, I am working on this problem since a bit and I cannot find any way through. I tried some things but none worked so far...</p>
  <h1>Problem:</h1>
  <p>In simple, the problem is that when we play with the controls of a form which has <em>submitdisabledcontrols=&quot;true&quot;</em>, there seem to be some WebForms auto-generated javascript that refreshes (after some time) the UI and keeps some fields disabled even though the user just enabled them.</p>
  <p>This happens with Webforms (.NET 4.5.2, but it seems to be true on previous version of .NET).</p>
  <p>Chrome and Firefox are fine.</p>
  <h1>Concretely:</h1>
  <p>Here is exactly the form I have in a master page (so all the pages will use it)</p>
  <pre><code>&lt;form id=&quot;form1&quot; runat=&quot;server&quot; submitdisabledcontrols=&quot;true&quot;&gt;
  &lt;div&gt;
      &lt;asp:ContentPlaceHolder ID=&quot;ContentPlaceHolder1&quot; runat=&quot;server&quot;/&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Here is an extract of what we have in one of the pages (I cleaned up a bit for you, so you're not annoyed with the old style CSS tab formatting):</p>
  <pre><code>&lt;asp:RadioButton ID=&quot;RB_foo&quot; onclick=&quot;setEnabled();&quot; runat=&quot;server&quot; EnableViewState=&quot;False&quot; GroupName=&quot;Action&quot;&gt;&lt;/asp:RadioButton&gt;
  &lt;asp:RadioButton ID=&quot;RB_bar&quot; onclick=&quot;setEnabled();&quot; runat=&quot;server&quot; CssClass=&quot;control_checkbox&quot; EnableViewState=&quot;False&quot; GroupName=&quot;Action&quot;&gt;&lt;/asp:RadioButton&gt;
  &lt;asp:RadioButton ID=&quot;RB_parentopt&quot; onclick=&quot;setEnabled();&quot; runat=&quot;server&quot; CssClass=&quot;control_checkbox&quot; EnableViewState=&quot;False&quot; GroupName=&quot;Action&quot;&gt;&lt;/asp:RadioButton&gt;
      &lt;asp:CheckBox ID=&quot;chkboxwithchildren&quot; runat=&quot;server&quot; CssClass=&quot;control_checkbox&quot; onclick=&quot;setEnabled();&quot; /&gt;
          &lt;asp:RadioButton ID=&quot;RB_opt1&quot; onclick=&quot;setEnabled();&quot; runat=&quot;server&quot; CssClass=&quot;control_checkbox&quot; EnableViewState=&quot;False&quot; GroupName=&quot;Deliver&quot;&gt;&lt;/asp:RadioButton&gt;
          &lt;asp:RadioButton ID=&quot;RB_opt2&quot; onclick=&quot;setEnabled();&quot; runat=&quot;server&quot; CssClass=&quot;control_checkbox&quot; EnableViewState=&quot;False&quot; GroupName=&quot;Deliver&quot;&gt;&lt;/asp:RadioButton&gt;
  </code></pre>
  <p>setEnabled(); is controlling the state of each input according to who is enabled or not following the rule that a child is enable if and only if the parent is enabled. This is not a problem as, when we click on &quot;parentopt&quot;, we got from <a href="https://i.stack.imgur.com/Cg8XH.png" rel="nofollow noreferrer">this state</a> to <a href="https://i.stack.imgur.com/VBzkL.png" rel="nofollow noreferrer">this state</a>.</p>
  <p><a href="https://i.stack.imgur.com/FxIup.png" rel="nofollow noreferrer">The problem</a> then appears after a few seconds (but not everytime) and I can see that the checkboxes are flickering like if something was updating it on regular bases.</p>
  <h1>Investigations:</h1>
  <p>1- I could find out that changing to submitdisabledcontrols=&quot;false&quot; get rid of it, but I still need the disabled controls when submitting...</p>
  <p>2- Looking a bit deeper in what ASP is creating me. I could see that it is creating a form inside an iframe which looks like this :</p>
  <pre><code>&lt;form id=&quot;aspnetForm&quot; onsubmit=&quot;javascript:return WebForm_OnSubmit();&quot; action=&quot;./ASKeywordChecking.aspx&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;&gt;
  </code></pre>
  <p>This &quot;WebForm_OnSubmit()&quot; calls a &quot;WebForm_ReEnableControls()&quot; which plays with the disabled properties of the controls internally and I don't seem to have control over this (generated automatically).</p>
  <p>And that's pretty much as far as I could go...</p>
  <p>Does anyone ever experienced this ? Do you have any ideas or need any more input one what I have on my side ?</p>