title: onclick event not working in Internet Explorer
body: <p>I'm using asp.net to add add a client side onclick event to a span tag in a ListView:</p>
  
  <pre><code>&lt;span id="mySpan" onclick="&lt;%# Request.Cookies["myCookie"] != null ? "MyFunction1(" + Eval("MyVal1") + ");" : "MyFunction2(" + Eval("MyVal2") + ");" %&gt;"
  </code></pre>
  
  <p>Every aspect of what I'm doing always works perfectly in Chrome and FF 100% of the time. In IE (v8 and v9), it always adds the correct javascript function and all of the code looks perfect - the rendered span code in IE looks identical to how it looks in Chrome and FF. However, when monitoring traffic with Fiddler, several random IE spans don't trigger the javascript function at all. Some do. There is no difference in the code between ones that work and ones that do not work. The ones that don't work in IE work fine in Chrome and FF. I am also able to confirm the javascript function isn't being fired by using means other than Fiddler, so Fiddler isn't giving me false readings.</p>
  
  <p>Is there something I'm doing in my asp code to add the function that may be screwing this up in IE?</p>