Solved

clear asp.net validation control using javascript

Posted on 2009-03-30
1
808 Views
Last Modified: 2012-05-06
I've got some validation controls on my asp.net page and they seem to be working fine to do their initial validation.  However, after the page does a postback, some of the validation controls are triggered and display their error messages even though the input in the textboxes was valid before the postback.  So I enter information and click the submit button and everything submits fine.  The page posts back and I have it set up to place all of the information back into the same text boxes, but when the page posts back I'm getting the validation error messages.  I'm looking for a way to clear out those validation messages initially so they don't display when the page loads, however, I don't want to make it so the error messages won't be displayed if the user changes the input to invalid data.

Is there a way to do this with javascript?  Like maybe embed a script at the bottom of the page that will run last and clear out those validation messages?
0
Comment
Question by:josephdaviskcrm
1 Comment
 
LVL 6

Accepted Solution

by:
ITHelper80 earned 500 total points
ID: 24024256
How are you doing the postback?

If its by a control other than the submit button you can set causesvalidation = "false"

I would help if you posted some code.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now