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