Validation doesn't work

B

Buddy Ackerman

I have one page where I used field validator controls and it works fine. It is set to do client side validation. I did the same thing on another page and set everything the same way as the first page and the validation doesn't work.

Here is a textbox, validator control, button and validation suamry control from the first (working) page:

<asp:TextBox ID="CustPassword" TextMode="Password" Columns="20" maxlength="50" runat="server" ValidationGroup="account" CausesValidation="true"></asp:TextBox> <asp:Label ID="accountaspx19" runat="server" Text="(!account.aspx.19!)"></asp:Label>

<asp:RequiredFieldValidator ID="ReqValPassword" runat="server" ControlToValidate="CustPassword" Display="none" EnableClientScript="true" ErrorMessage="Password is required"></asp:RequiredFieldValidator></td>

<asp:Button ID="btnUpdateAccount" OnClientClick="Page_ValidationActive=true;" CssClass="UpdateAccountButton" Text="(!account.aspx.28!)" runat="server" CausesValidation="true" ValidationGroup="account" />

<asp:ValidationSummary DisplayMode="BulletList" ID="ValSummary" ShowMessageBox="true" runat="server" ShowSummary="false" ValidationGroup="account"/>


Here are similar controls from the page that is not working.

<asp:TextBox ID="password" runat="server" Columns="20" MaxLength="50" TextMode="Password" ValidationGroup="createaccount"></asp:TextBox>

<asp:RequiredFieldValidator ID="valReqPwd" ControlToValidate="password" EnableClientScript="true" runat="server" ValidationGroup="createaccount" Display="None"></asp:RequiredFieldValidator>

<asp:Button ID="btnContinueCheckout" CssClass="ContinueCheckoutButton" OnClientClick="Page_ValidationActive=true;" runat="server" Text="(!createaccount.aspx.76!)" CausesValidation="True" ValidationGroup="createaccount" />

<asp:ValidationSummary ID="valSummary" DisplayMode="BulletList" runat="server" ShowMessageBox="true" ShowSummary="false" ValidationGroup="createaccount" />

Any idea why the escond one doesn't work and the first one does? Is there something else that should be getting set (although there is nothing being set in the foirst page that isn't being set in teh second page)? The ErrorMessage attributes for the second page are being set in code rather than set in teh control tag itself. Also both pages have ClientTarget set to "UpLevel".


Thanks for your help.


--Buddy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top