468,107 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

ASP.NET 2 Beta 2 JavaScript bad rendering

Hi. I was handling key events nicely using some Javascript on my apps using
something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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.
Nov 19 '05 #1
6 1327
Can you show how you render the script to the client? IOW, do you use Page.ClientScriptRegisterClientScriptBlock
or something else?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. I was handling key events nicely using some Javascript on my apps
using something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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.


Nov 19 '05 #2
using something like this in my Page_Load method.:

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


"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:79**********************@msnews.microsoft.com ...
Can you show how you render the script to the client? IOW, do you use
Page.ClientScriptRegisterClientScriptBlock or something else?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. I was handling key events nicely using some Javascript on my apps
using something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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 &amp;&amp; instead of &&, so clients
are getting this instead:

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

Please HELP!!

Thanks,

Alejandro Penate-Diaz.


Nov 19 '05 #3
do you think this would work?
<system.web>
<!-- other elements here -->
<XHTML11Conformance
enableObsoleteRendering="true" />
</system.web>


"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:79**********************@msnews.microsoft.com ...
Can you show how you render the script to the client? IOW, do you use
Page.ClientScriptRegisterClientScriptBlock or something else?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. I was handling key events nicely using some Javascript on my apps
using something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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 &amp;&amp; instead of &&, so clients
are getting this instead:

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

Please HELP!!

Thanks,

Alejandro Penate-Diaz.


Nov 19 '05 #4
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


"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:79**********************@msnews.microsoft.com ...
Can you show how you render the script to the client? IOW, do you use
Page.ClientScriptRegisterClientScriptBlock or something else?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. I was handling key events nicely using some Javascript on my apps
using something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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 &amp;&amp; instead of &&, so clients
are getting this instead:

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

Please HELP!!

Thanks,

Alejandro Penate-Diaz.


Nov 19 '05 #5
Well, I see the &amp; that it's rendering, but the code executes properly.
Does your javascript work?

-Brock
DevelopMentor
http://staff.develop.com/ballen
using something like this in my Page_Load method.:

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

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:79**********************@msnews.microsoft.com ...
Can you show how you render the script to the client? IOW, do you use
Page.ClientScriptRegisterClientScriptBlock or something else?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. I was handling key events nicely using some Javascript on my
apps using something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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 &amp;&amp; instead of &&, so
clients are getting this instead:

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

Please HELP!!

Thanks,

Alejandro Penate-Diaz.


Nov 19 '05 #6
It doesn't work
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:81**********************@msnews.microsoft.com ...
Well, I see the &amp; that it's rendering, but the code executes properly.
Does your javascript work?

-Brock
DevelopMentor
http://staff.develop.com/ballen
using something like this in my Page_Load method.:

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

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:79**********************@msnews.microsoft.com ...
Can you show how you render the script to the client? IOW, do you use
Page.ClientScriptRegisterClientScriptBlock or something else?

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi. I was handling key events nicely using some Javascript on my
apps using something like this:
this.txtUserName.Attributes.Add("onkeydown","if((e vent.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 &amp;&amp; instead of &&, so
clients are getting this instead:

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

Please HELP!!

Thanks,

Alejandro Penate-Diaz.


Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by somebody | last post: by
15 posts views Thread by binnyva | last post: by
136 posts views Thread by Matt Kruse | last post: by
8 posts views Thread by jojobar | last post: by
8 posts views Thread by Peter Michaux | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.