The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Scripting errors on an aspx page, validatorcontrols and causesvalidation ('undefined' is null or...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Peter van Ooijen

Posts: 284
Nickname: petergekko
Registered: Sep, 2003

Peter van Ooijen is a .NET devloper/architect for Gekko Software
Scripting errors on an aspx page, validatorcontrols and causesvalidation ('undefined' is null or... Posted: Sep 9, 2005 2:10 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Peter van Ooijen.
Original Post: Scripting errors on an aspx page, validatorcontrols and causesvalidation ('undefined' is null or...
Feed Title: Peter's Gekko
Feed URL: /error.htm?aspxerrorpath=/blogs/peter.van.ooijen/rss.aspx
Feed Description: My weblog cotains tips tricks and opinions on ASP.NET, tablet PC's and tech in general.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Peter van Ooijen
Latest Posts From Peter's Gekko

Advertisement

The ASP.NET toolbox has some nice validator controls like RequiredFieldValidator and RangeValidator. These perform a first validation of client input in the browser. On postback the validation is repeated on the server. The client side validation is not supported in every browser and is skipped in some scenarios. A side effect of the validation scripts is that a page with validator controls sometimes pops up quite mysterious scripting errors. This is because validation is, by default, performed on every roundtrip. In some scenarios this can lead to invisible controls being validated with null values and script errors like 'undefined' is null or not an object.

The good thing is that you can disable validation on a control base. Every control which can force a postback, like a button or linkbutton, has the CausesValidation property. Default it is set to true. Set it to false in case there is nothing to validate and your script errors are gone.

Read: Scripting errors on an aspx page, validatorcontrols and causesvalidation ('undefined' is null or...

Topic: Spammers vs. Greg - back to even Previous Topic   Next Topic Topic: Enterprise Libraru BOF at PDC

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use