Re: Page showing as not valid
- From: "tshad" <t@xxxxxxxx>
- Date: Wed, 21 Feb 2007 16:28:14 -0800
"Nathan Sokalski" <njsokalski@xxxxxxxxxxx> wrote in message
news:OEW7HrMUHHA.5016@xxxxxxxxxxxxxxxxxxxxxxx
Well, here are some questions/tests that might help you and some of us in
the newsgroups answer your question:
1. How do you know that none of the Validators fired?
Because I have no error messages. I have only 2 Validators
<td ><asp:TextBox ID="RequestedStartDate" Columns="12"
runat="server"/>
(Applicant will have the option to request an alternative date)
<asp:RequiredFieldValidator runat="server"
ControlToValidate="RequestedStartDate"
Display="Dynamic"
Type="Date" text="<br>Start Date Required"/>
<asp:RegularExpressionValidator
ControlToValidate="RequestedStartDate"
ValidationExpression="^(([1-9])|(0[1-9])|(1[0-2]))\/(([1-9])|(0[1-9])|(1[0-9])|(2[0-9])|(3[0-1]))\/((\d{2})|(\d{4}))$"
Display="Dynamic"
Text="<br>From Date Invalid or in Wrong Format(MM/DD/YY)"
runat="server"/>
2. What is the value for the CausesValidation property of any Buttons,
TextBoxes, DropDownLists, or other controls that might have that property
on your page?
I don't have anything set for the CausesValidation of any objects. I have 2
textboxes and about 10 dropdowns.
It may also help us answer your question if we could see your code so that
we know exactly what is happening on your page, so you may want to post
it.
It would be a little hard to post as it is a large page which is a One page
(not code-behind) style.
The test is:
trace.warn("Before Page.IsValid if Page.IsValid = " & Page.IsValid )
If not Page.IsValid then
Exit Sub
End if
In the above code Page.IsValid is set to false.
Thanks,
Tom
Good Luck!
--
Nathan Sokalski
njsokalski@xxxxxxxxxxx
http://www.nathansokalski.com/
"tshad" <t@xxxxxxxx> wrote in message
news:%23DBDFxGUHHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
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 is making the Page invalid?
Thanks,
Tom
.
- Follow-Ups:
- Re: Page showing as not valid
- From: tshad
- Re: Page showing as not valid
- References:
- Page showing as not valid
- From: tshad
- Re: Page showing as not valid
- From: Nathan Sokalski
- Page showing as not valid
- Prev by Date: Re: Display 2 Columns from a datasource in a DropDownList
- Next by Date: RE: Custom Validator checking for dulicates in database from gridview
- Previous by thread: Re: Page showing as not valid
- Next by thread: Re: Page showing as not valid
- Index(es):