RequiredFieldValidator doesn't show error message and missing __postback function

  • Thread starter Thread starter John Sutter
  • Start date Start date
J

John Sutter

I have a webpage which has a few asp:textbox's and an asp:button. I also
have a few RequiredFieldValidators for these text boxes. When I click on
the button while the textboxes are empty, I don't see any error messages
from the validators. I noticed the __doPostBack function is also missing
along with the two args in the source.

I thought a button adds this function. When I changed a textbox to
autopostback, the function appeared. But I don't want to autopostback and
the error messages still don't show up.

I have display set to dynamic, enabled is true and enableclientscript is
true.


Any clues?

J.
 
Make sure on your Postback that:

Post.IsValid = true

you could place this in Page_Load method
 
From what you have described, the system doesn't think Client-side
validation needs to be setup for the submit button.

There are two possibilities
1. The button has CausesValidation=false. This omits the call to
Page_ClientValidate() and thus prevents client-side validation.
2. The page thinks the browser isn't IE. The ClientTarget on the page may
not be blank. It may reflect something like "Downlevel". Client-side
validation requires detection of IE.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 
Back
Top