ウィザードの最初のステップとして、いくつかのテキスト ボックスがあります。
これらすべてのテキストボックスには、requiredfieldvalidator があります。
[完了] をクリックする前の最後のステップとして、ウィザードの最後にすべてのエラーを表示する必要があるため、これらの検証をバイパスするか、当面は無視する方法を見つける必要があります。
私が抱えている問題は、すべてのテキストボックスに入力するまで、ウィザードで次のステップに移動できないことです.
エラーを無視してウィザードをナビゲートし、ウィザードの最後にある検証の概要でエラーを使用する方法はありますか?
ここに私のaspコードがあります:(各テキストボックスのCausesValidationをfalseに設定しようとしましたが、これはまだ機能しません)
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1 - Customer Information">
<asp:Table runat="server" ID="UserInfoTable">
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label2" runat="server" Text="Identification Number:"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtUserID" CausesValidation="false"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator" ErrorMessage="*Required" ControlToValidate="txtUserID"></asp:RequiredFieldValidator><br />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label1" runat="server" Text="First Name:" CausesValidation="false"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtUserFName" CausesValidation="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*Required" ControlToValidate="txtUserFName"></asp:RequiredFieldValidator><br />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label3" runat="server" Text="Second Name:" CausesValidation="false"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtUserSurname"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*Required" ControlToValidate="txtUserSurname"></asp:RequiredFieldValidator><br />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label4" runat="server" Text="Street Addrress:" CausesValidation="false"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtUserAddress" CausesValidation="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*Required" ControlToValidate="txtUserAddress"></asp:RequiredFieldValidator><br />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label5" runat="server" Text="City:" CausesValidation="false"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtUserCity"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*Required" ControlToValidate="txtUserCity"></asp:RequiredFieldValidator><br />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label6" runat="server" Text="E-Mail:" CausesValidation="false"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtUserEmail"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="*Email address incorrect" ControlToValidate="txtUserEmail" ValidationExpression=".+@.+"></asp:RegularExpressionValidator><br />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="Label7" runat="server" Text="Contact Number:" CausesValidation="false"></asp:Label>  
</asp:TableCell>
<asp:TableCell>
<asp:TextBox runat="server" ID="txtContactNo"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*Required" ControlToValidate="txtContactNo"></asp:RequiredFieldValidator>
<br />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:WizardStep>
検証サマリーの使用方法を知っています。だから私はそれについて助けを必要としません..コントロールの検証を無効にする方法を知る必要があるだけです。
ご協力ありがとうございました。