ASP.NET 2 Beta 2 JavaScript bad rendering

  • Thread starter Alejandro Penate-Diaz
  • Start date
A

Alejandro Penate-Diaz

Hi. I was handling key events nicely using some Javascript on my apps using
something like this:
this.txtUserName.Attributes.Add("onkeydown","if((event.which && event.which
== 13)||(event.keyCode && event.keyCode ==
13)){document.Form1.cmdLogin.click();return false;}else return true;");

that code rendered javascript to the client OK. Now that I upgraded to
ASP.NET 2 Beta 2 it is rendering && instead of &&, so clients are
getting this instead:

if((event.which && event.which == 13)||(event.keyCode &&
event.keyCode == 13)){document.Form1.cmdLogin.click();return false;}else
return true;

Please HELP!!

Thanks,

Alejandro Penate-Diaz.
 
A

Alex D.

using something like this in my Page_Load method.:

this.txtUserName.Attributes.Add("onkeydown","if((event.which &&event.which
== 13)||(event.keyCode && event.keyCode
==13)){document.Form1.cmdLogin.click();return false;}else return true;");
 
A

Alex D.

do you think this would work?
<system.web>
<!-- other elements here -->
<XHTML11Conformance
enableObsoleteRendering="true" />
</system.web>
 
A

Alex D.

that didnt work, when I build the app I get an error like:
Error 1 Unrecognized configuration section XHTML11Conformance.
c:\inetpub\wwwroot\qman\Web.config 9
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top