473,508 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page.IsValid Not Working

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

Jul 12 '07 #1
5 9237
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 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

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

Cheers,

Sam

Jul 13 '07 #2
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
Jul 13 '07 #3

de*********@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 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 *


Hi,

Visit this page:

http://www.vkinfotek.com/validationcontrols.html

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

Jul 13 '07 #4
On Jul 13, 1:07 am, xazos79 <snicoli...@gmail.comwrote:
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..

Jul 14 '07 #5
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.

Jul 16 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3388
by: Matthias Lohrer | last post by:
Hi, I'm playing around with the possibilities of Page.ParseControl. I parse a string with an input-field and an RequiredFieldValidator-control. For testing the server-side validation I disable...
5
2518
by: Jim Heavey | last post by:
When should you use the Page.Validate() method? I thought you would use this method if you have some Server side validation (CustomControl's) you wanted to use and this would cause them to be...
0
1108
by: Vi | last post by:
Hi, I have a form which displays some orders based on dates selected or based on an order number. I have two different buttons for each kind of query, but both buttons call the same method in the...
0
1648
by: Martin | last post by:
Hi, I wanted to preform my own custom validation for the entire page so i though I would implemet the IValidator interface and do all of my validation in the "Validate" method, and this works...
7
1790
by: tshad | last post by:
I have a page that is showing as: Page.IsValid = False on postback when my submit button is pressed but none of my Validators have fired so there is no error message. How do I find out what...
1
4816
by: mbruyns | last post by:
i have been trying (and sometimes succeeding) to use the modalpopupextender to show various panels of controls on my asp pages. the strange problem that i keep on running into is that sometimes it...
3
6179
by: Andrew Jocelyn | last post by:
Hi I have couple of dropdown controls each with a requiredfieldvalidator. I clear the dropdownlist in the button click event. When the page is rendered the dropdown validator already flags it's...
2
2200
by: =?Utf-8?B?R2FyeSBMYXJpbWVy?= | last post by:
I an asp.net web page with a simple form and a Submit button. Form entries are validated client side, but as a back up I would also like to validate server side, but not sure where to do it code....
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.