473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

No Validation

I have a page that has no Validation objects, but I also have the following
code:

if not Page.IsValid
exit sub
end if

For some reason, the page is hitting the "exit sub" statement?

How can that be? What else would invalidate a page and how can I find out
what caused it to be invalid?

Thanks,

Tom
Feb 1 '06 #1
2 1180
FROM THE HELP FILE:
(Read Property Value and Remarks to see why you have your issue)
-----------------------------------------------------------------------------
Page.IsValid Property
Gets a value indicating whether page validation succeeded.

[Visual Basic]
Public ReadOnly Property IsValid As Boolean

[C#]
public bool IsValid {get;}

[C++]
public: __property bool get_IsValid();

[JScript]
public function get IsValid() : Boolean;

Property Value
true if page validation succeeded; otherwise, false.

Remarks
For this property to return true, all validation server controls in the
Page.Validators property must validate successfully. You should check this
property only after you have called the Page.Validate method, or set the
CausesValidation property to true in the OnServerClick handler for an ASP.NET
server control that initiates form processing. These server controls include
the Button, HtmlButton, HtmlInputButton, HtmlInputImage, ImageButton, and
LinkButton classes.

---------------------------------------------

The default is fail. That is why your exit works. Best advice: Do not
include validation when there is none on the page.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:
I have a page that has no Validation objects, but I also have the following
code:

if not Page.IsValid
exit sub
end if

For some reason, the page is hitting the "exit sub" statement?

How can that be? What else would invalidate a page and how can I find out
what caused it to be invalid?

Thanks,

Tom

Feb 1 '06 #2

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:C2**********************************@microsof t.com...
FROM THE HELP FILE:
(Read Property Value and Remarks to see why you have your issue)
-------------------------------------------------------------------------- --- Page.IsValid Property
Gets a value indicating whether page validation succeeded.

[Visual Basic]
Public ReadOnly Property IsValid As Boolean

[C#]
public bool IsValid {get;}

[C++]
public: __property bool get_IsValid();

[JScript]
public function get IsValid() : Boolean;

Property Value
true if page validation succeeded; otherwise, false.

Remarks
For this property to return true, all validation server controls in the
Page.Validators property must validate successfully. You should check this
property only after you have called the Page.Validate method, or set the
CausesValidation property to true in the OnServerClick handler for an ASP.NET server control that initiates form processing. These server controls include the Button, HtmlButton, HtmlInputButton, HtmlInputImage, ImageButton, and
LinkButton classes.

---------------------------------------------

The default is fail. That is why your exit works. Best advice: Do not
include validation when there is none on the page.
That would make sense.

Thanks,

Tom
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"tshad" wrote:
I have a page that has no Validation objects, but I also have the following code:

if not Page.IsValid
exit sub
end if

For some reason, the page is hitting the "exit sub" statement?

How can that be? What else would invalidate a page and how can I find out what caused it to be invalid?

Thanks,

Tom

Feb 3 '06 #3

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

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
2
by: wumingshi | last post by:
Hi, When validating an XML instance, sometimes the schema is not enough to expression the validation rules. Additional validation rules may be expressed in an application-specific way. For...
4
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
7
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.