ValidationGroup property in Wizard control

V

vdahiya

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
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top