Using CustomValidator to valid url QueryString

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hi,

Because I need this validation without a postback occuring, I call
Page.Validate from the Page.Load event handler. The corresponding
ServerValidate event handler is called, and as this finishes the
CustomValidator.IsValid is false. However on returning to Page_load, the
CustomValidator.IsValid is true again!!

What's wrong?

Thanks
Martin
 
I was setting the validator control directly, not setting ServerValidate
event args.IsValid.

Makes me wonder how I should set the error message text, if I shouldn't
manipulate valdiator control directly in servervalidate event handler.

??
Martin
 
Back
Top