Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Page.IsValid Not Working

0 views
Skip to first unread message

dean_...@teamji.com

unread,
Jul 12, 2007, 7:23:09 PM7/12/07
to
Hello,
I am using a regular expression validator for a textbox where
numerics should only be entered.
The error message appears when non numerics are entered, as it
should. After clicking the submit
button, I check the page.isvalid property, which is true, but should
be false, as the control is not valid.
Any ideas? Possible issues: It is any AJAX page? It is a
WebPart?
Thanks for any help...........Dean

xazos79

unread,
Jul 13, 2007, 1:07:21 AM7/13/07
to


I believe you'll have to run the Page.Validate() method before
checking the IsValid property.

Cheers,

Sam

Hans Kesting

unread,
Jul 13, 2007, 3:56:29 AM7/13/07
to
> On Jul 13, 8:23 am, dean_wil...@teamji.com wrote:
>
> I believe you'll have to run the Page.Validate() method before
> checking the IsValid property.
>

No, either that has already been done by "the system" or you will get an
exception
telling you that you need to run Validate() first. So that's not the problem.

Hans Kesting


bhar

unread,
Jul 13, 2007, 8:27:09 AM7/13/07
to

dean_...@teamji.com wrote:
> *Hello,
> Thanks for any help...........Dean *

Hi,

Visit this page:

[url]http://www.vkinfotek.com/validationcontrols.html[/url]

--
bhar
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

dean_...@teamji.com

unread,
Jul 14, 2007, 9:41:42 AM7/14/07
to
On Jul 13, 1:07 am, xazos79 <snicoli...@gmail.com> wrote:
> On Jul 13, 8:23 am, dean_wil...@teamji.com wrote:
>
> > Hello,
> > I am using a regular expression validator for a textbox where
> > numerics should only be entered.
> > The error message appears when non numerics are entered, as it
> > should. After clicking the submit
> > button, I check thepage.isvalidproperty, which is true, but should

> > be false, as the control is not valid.
> > Any ideas? Possible issues: It is any AJAX page? It is a
> > WebPart?
> > Thanks for any help...........Dean
>
> I believe you'll have to run the Page.Validate() method before
> checking the IsValid property.
>
> Cheers,
>
> Sam

I added the Page.Validate() method and that worked.....Thanks, Sam..

xazos79

unread,
Jul 16, 2007, 1:42:19 AM7/16/07
to
> No, either that has already been done by "the system" or you will get an
> exception
> telling you that you need to run Validate() first. So that's not the problem.
>
> Hans Kesting

Hmm, in my experience Hans that's not the case. CausesValidation for
all the controls within the validation group need to be set to true
for automatic validation to occur.

0 new messages