ValidationGroup property in Wizard control
- From: vdahiya@xxxxxxxxx
- Date: 17 Apr 2006 10:00:27 -0700
Hi All,
I need to validate two text boxes in my wizard control. Here is the
code:
<StepNavigationTemplate>
<asp:Button ID="StepPreviousButton" runat="server" BackColor="White"
BorderColor="#C5BBAF" BorderStyle="Solid" BorderWidth="1px"
CausesValidation="False" CommandName="MovePrevious"
Font-Names="Verdana" Font-Size="0.8em" ForeColor="#1C5E55"
Text="Previous" />
<asp:Button ID="StepNextButton" runat="server" BackColor="White"
BorderColor="#C5BBAF" BorderStyle="Solid" BorderWidth="1px"
CommandName="MoveNext" Font-Names="Verdana" ValidationGroup="Grp1"
Font-Size="0.8em" ForeColor="#1C5E55" Text="Next" />
</StepNavigationTemplate>
____________________________________
<asp:WizardStep runat="server" Title="Description">
Web Service Name: <asp:TextBox ID="tbServiceName" runat="server"
MaxLength="255" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="tbServiceName" ErrorMessage="*"
ValidationGroup="Grp1"> </asp:RequiredFieldValidator>
<br />
Description: <asp:TextBox ID="tbWSDesc" runat="server" Height="16px"
Width="340px" MaxLength="255" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="tbWSDesc" ErrorMessage="*" ValidationGroup="Grp1">
</asp:RequiredFieldValidator>
But when I click the next button (with empty text boxes), It goes to
the next step in my wizard control.
Any idea how to keep the active step index to the same step in case the
validation fails?
Any help would be appreciated.
Thanks.
~VD
.
- Prev by Date: RE: Could not find a part of the path - User control from within I
- Next by Date: How do create an Admin page that has the same functionality as "Security" tab in 'ASP.NET configuration tool'?
- Previous by thread: Re: How to log out of asp.net app using Windows Auth NOT Forms Auth
- Next by thread: How do create an Admin page that has the same functionality as "Security" tab in 'ASP.NET configuration tool'?
- Index(es):