Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 818
  • Last Modified:

clear asp.net validation control using javascript

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
josephdaviskcrm
Asked:
josephdaviskcrm
1 Solution
 
ITHelper80Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now