469,292 Members | 1,310 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,292 developers. It's quick & easy.

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

<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">


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


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




<asp:Label ID="_lblPostCode" runat="server"

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

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

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


<asp:Button ID="Button1" runat="server" Text="Next" CommandName="MoveNext"

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



<asp:Label ID="_lblExpiry" runat="server"

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

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

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


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

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



May 4 '06 #1
0 1641

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by John Mabbott | last post: by
1 post views Thread by CGuy | last post: by
3 posts views Thread by Christer | last post: by
2 posts views Thread by TIBM | last post: by
2 posts views Thread by Sunil Sabir | last post: by
1 post views Thread by Ken Varn | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.