Is ASP.NET EventHandler attachment asymmetric?
<p>I have a form that uses client-side scripting to manage controls' interaction before a record is written to the database, and then switches to postbacks/server-side once inputs are updates to an existing record. Controls are CheckBoxes and TextBoxes in GridView rows.</p>

<p>This works:</p>

<p>a) Assign OnCheckChanged, OnTextChanged handlers in the .aspx item templates (and implicitly set AutoPostBack false by accepting its default)</p>

<p>b) In the method that binds the GridView,</p>

<pre><code>if (dbID == 0) {
  // attach onclick and onchange .Attributes
  // unset AutoPostBack
  // -= EventHandlers
} else {
  // clear .Attributes
  // set AutoPostBack
}
</code></pre>

<p>It seems logically equivalent to NOT specify anything in the template, and</p>

<pre><code>if (dbID == 0) {
  // attach onclick and onchange .Attributes
} else {
  // clear .Attributes
  // += EventHandlers
  // set AutoPostBack
}
</code></pre>

<p>but it apparently isn't. The first way works, the second does not. Am I missing something obvious?</p>
