Anatoly Lubarsky

Logo
MSSQL, .NET, Design. Life and Music

ASP.NET 2.0: Bug - XHTML - Javascript Rendering

Suppose the following scenario:


  • Default XHTML conformance (transitional).
  • Webform with textboxes, submit button and RequiredFieldValidator fields.

Since submit button onsubmit attribute is rendered as follows in IE 7:


javascript:WebForm_DoPostBackWithOptions(new 
WebForm_PostBackOptions("ctl02", "", true, "", "", false, true))"

It causes javascript error in IE 7 (annoying small yellow js error icon at the bottom-left). Missing semi-colon [ ; ]. While everything works fine (form submits normally).


I don't get javascript error when either of the following:


  1. Using FF.
  2. Using enableclientscript="false" attribute for RequiredFieldValidator (no javascript, validation is server-side).
  3. Using Legacy attribute for XHTMLconformance in web.config.

Related Posts:

Saturday, January 06, 2007 6:23 AM

Comments

# re: ASP.NET 2.0: Bug - XHTML - Javascript Rendering
Did anyone find a solution to what is causing this?

5/10/2007 1:29 AM by Chad Nash

If your feedback doesn't appear right away, please be patient as it may take a few minutes to publish.

Post a Comment

Protected by CAPTCHAEnter the code you see
Name (*)  
E-mail (*)  
Url
Remember

Comment (*)