473,406 Members | 2,217 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,406 software developers and data experts.

Problem with ValidationSummary/Validation groups and Wizards

Hi there,

Please please could someone shed some like on a problem that I'm having
using a combination of Wizards, ValidationGroups and ValidationSummary
controls. What I want to do is to have a wizard that will take me through
several steps, and at each step validate input data using
RequiredFieldValidators etc. displaying any errors in a Validation Summary.
The problem that I have is that I cannot seem to have a ValidationSummary
control on each step of the wizard and get client side validation to take
place. If I remove the summary control from the second step of the wizard,
then all is well and client side validation takes place.

I've broken the problem down to it's most simple form see code below which
demonstrates the problem.

I've struggled for many hours to track the problem down to this, so I'm
hoping that some kind person can show me the error of my ways or provide an
acceptable work around. I do need to have the summary panel on each step
though, so thinking caps on..

Thanks in advance

Andy
<h1>If you can leave the edit control empty and click on the next button
then the client side validation is NOT working!</h1>

<asp:Wizard ID="Wizard1" runat="server" DisplaySideBar="false">

<WizardSteps>

<asp:WizardStep runat="server" Title="Step 1">

</asp:WizardStep>

<asp:WizardStep runat="server" Title="Step 2">

</asp:WizardStep>

</WizardSteps>

<StartNavigationTemplate>

<asp:Label ID="_lblPostCode" runat="server"
AssociatedControlID="_txtPostCode">PostCode:</asp:Label>

<asp:TextBox ID="_txtPostCode" runat="server"></asp:TextBox>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="_txtPostCode"

ErrorMessage="A postcode need is required and must be in the form BN43 5HF."
ToolTip="A postcode is is required."

ValidationGroup="_register">*</asp:RequiredFieldValidator>

<asp:Button ID="Button1" runat="server" Text="Next" CommandName="MoveNext"
ValidationGroup="_register"/>

<asp:ValidationSummary ID="changePasswordSummary" runat="server"
ValidationGroup="_register" />

</StartNavigationTemplate>

<FinishNavigationTemplate>

<asp:Label ID="_lblExpiry" runat="server"
AssociatedControlID="_txtExpiry">Expiry:</asp:Label>

<asp:TextBox ID="_txtExpiry" runat="server"></asp:TextBox>

<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="_txtExpiry"

ErrorMessage="A card expiry date is required and must be in the form MM/YY."
ToolTip="A card expiry date is required."

ValidationGroup="_expiry">*</asp:RequiredFieldValidator>

<asp:Button ID="Button2" runat="server" Text="Finished"
CommandName="MoveEnd" ValidationGroup="_expiry"/>

<asp:ValidationSummary ID="changePasswordSummary" runat="server"
ValidationGroup="_expiry" />

</FinishNavigationTemplate>

</asp:Wizard>


May 4 '06 #1
0 1783

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

Similar topics

0
by: John Mabbott | last post by:
Hello all, We're getting some weird behavior with the ValidationSummary control. If I submit a page that fires some validators, the ValidationSummary displays them correctly. However, if I...
1
by: CGuy | last post by:
Hi, I have the following code in my aspx page <form id="Form1" method="post" runat="server"> <asp:TextBox ID="txtTest" Runat="server" /> <asp:RequiredFieldValidator ID="valText"...
3
by: Christer | last post by:
Hi all! I recently created a MessageBox webcontrol for asp.net. This can be used as is, but I also want to take ude of it in other webcontrols. Right now i creating a ValidationSummary control,...
2
by: TIBM | last post by:
Hi. I've posted this question on another newsgroup, but I haven't received any answers.. I have a login page where users input userID and password and click a Login button. Before calling the ...
2
by: Sunil Sabir | last post by:
Dear All, I am using ValidationSummary,RequiredField Validator and Regular Expression Validator in my ASP.net form. I want to display error messages only in the ValidationSummary Control. But...
1
by: Dan Sikorsky | last post by:
I'm using SmartNavigation and need to automatically scroll to the top of the page when the ValidationSummary control catches errors and displays them, so that the user can see the errors without...
1
by: Ken Varn | last post by:
If a page has multiple ValidationSummary controls, how does it distinguish which ValidationControls are associated with which ValidationSummary controls? The reason I am asking this is that I...
3
by: dei1c3 | last post by:
I've created a WebUserControl which is Composite Control. It includes several controls including a few RangeValidator controls and a ValidationSummary control. The WebUserControl works properly...
2
by: c676228 | last post by:
Hi, I have several user controls like email, phone,ssn etc. each has it's own validation message in its user control already. When I bring all those user controls in an aspx page, I would like to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.