Saturday, March 24, 2012

Validation controls and FormView

Hi,

I cannot seem to get validation controls to work within a Formview control.

With Firefox the server side validation doesn't work at all (I'm already aware that clientside won't work - thats not the problem). Clientside works fine in IE.

Any controls *outside* of the FormView control validate fine on the same page, its just those *inside* the FormView control that fail to validate.

If I call Page.IsValid in DataSource_Updating then I get the correct result but the validator controls do not pop up.

Any ideas?

Paul.Okay, for the record...

Just call Page.Validate() in the FormView_ItemInserting and FormView_ItemUpdating events, then if Page.Validate is false set e.Cancel = true;

No comments:

Post a Comment