Hi,
I'm having a similar problem, and seem to have tracked it down to the "StartNavigationTemplate" created by VS2005 in my Wizard.
I first noticed it on a CreateUserWizard page, and a regular Wizard on another page that I use to let users edit their profiles. The client-side validations work for me, but the server side validation does not work. I discovered it because my custom validators (no client-side script) didn't work at all.. and then when I set EnableClientScript to false on the other validators, they did not work on the server either.
Anyway, I re-built the page from scratch until the problem re-appeared. Didn't take long... I discovered that it seems to come from converting to a StartNaviagationTemplate. As you can see in the code below, I created a simple wizard page, added a single textbox, and a RequiredFieldValidator (with EnableClientScript="False"). It works with the simple 2-step wizard that VS2005 creates... validates as expected. But when I use VS2005 to "Convert to StartNavigationTemplate", with no other changes... it stops validating.
So... anyone have any ideas? Is this a bug in ASP? Maybe a bug in the way VS2005 implements the Navigation Template? Is there something I'm missing?? Any ideas how to fix or get around this???
Thanks for any advice!!
Validation Works:
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" DisplaySideBar="False">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
<asp:TextBox ID="TextBox1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="TextBox1"
ErrorMessage="RequiredFieldValidator"
EnableClientScript="False"/>
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2" />
</WizardSteps>
</asp:Wizard>
Validation Does Not work!!:
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" DisplaySideBar="False">
<WizardSteps>
<asp:WizardStep runat="server" Title="Step 1">
<asp:TextBox ID="TextBox1" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="TextBox1"
ErrorMessage="RequiredFieldValidator"
EnableClientScript="False"/>
</asp:WizardStep>
<asp:WizardStep runat="server" Title="Step 2" />
</WizardSteps>
<StartNavigationTemplate>
<asp:Button ID="StartNextButton" runat="server"
CommandName="MoveNext" Text="Next" />
</StartNavigationTemplate>
</asp:Wizard>
|