Hi,
I am having a problem with the validator controls in VB.net
conflicting with the javascript I am using to confirm whether or not
the user wants to submit the page. Here is the situation: I am having
the user edit a page with text boxes populated from a query against a
SQL Server database. When the user clicks on "Save", the information
currently contained in the text boxes will be saved to the database. I
am using the following code to pop up a confirmation box when the user
clicks on submit.
btnSave.Attribu tes.Add("onclic k", "return confirm('Are you sure you
want to edit this record?');")
This works fine until I place some validator controls, such as a
RequiredField Validator, into the page. The validator controls then
work fine, but the confirm box no longer comes up at all. Is there a
way to use the pop-up confirm box and the validator controls together?
This would be preferable because I need to validate not only the
individual controls but also the page as a whole. Thanks, Gene Hoke