I have a button that when clicked produces a PDF report. However I have validation on the page so that if the required fields are left empty when the button is clicked a validation summary appears. This doesn't work though. When the buttons clicked if fields are left empty it just reloads the page, but no validation sumamry shows. When the data is entered and the buttons clicked it brings up the window asking if the document should be opened or saved.

When I run through debug mode with no data entered

 if (Page.IsValid)

shows as true each time even when it isn't.

Any ideas?

4 Years
Discussion Span
Last Post by coder91

hmm...I'd recheck the validation controls to make sure that you have them validating the proper fields. I know that when I create multiple controls, I have a habit of copying and pasting them and sometimes forget to update the field that is being validated.


Silly mistake, forgot to include the button in the validation group.

Thanks for the help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.