Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to find out how to assess a wizardstep next button (or another way) to require validate a dropdownlist with "select" as the first option.

What I have tried:

<asp:WizardStep runat="server" Title="Personal Information" ID="step2">
                
                <asp:TextBox ID="txtsqlEmail" runat="server" Visible="False"></asp:TextBox>
                <table border="1" width="100%">
                    <colgroup>
                        <col style="width: 60%">
                        <col style="width: 40%">
                    <thead>
                        <tr>
                            <td style="text-align: right">
                            Employee ID:
                        <td>
                            <asp:TextBox ID="txtEmpId" runat="server" Width="200px" AutoPostBack="True" BackColor="#3366FF" Enabled="False" ForeColor="White"></asp:TextBox>
                        </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">Title:</td>
                            <td>
                                    <--!Want to require validate the tile using the next step button-->
                                <asp:DropDownList ID="DDTitle" runat="server" DataTextField="Title" DataSourceID="SqlTitle" AppendDataBoundItems="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="DDTitle" ErrorMessage="Please select Title" Font-Size="Small"                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: right">First Name:</td>
                            <td>
                                <asp:TextBox ID="txtFN" runat="server" Width="200px"></asp:TextBox></td>
                            <tr>
                                <td style="text-align: right">Last name:</td>
                                <td>
                                    <asp:TextBox ID="txtLN" runat="server" Width="200px"></asp:TextBox></td>
                            </tr>
                        <tr>
                            <td style="text-align: right">Email:</td>
                            <td>
                                <asp:TextBox ID="txtemail" runat="server" Width="200px" Enabled="False" BackColor="#3366FF" ForeColor="White"></asp:TextBox></td>
                        </tr>
                    </thead>
                </table>
            </asp:WizardStep>
Posted
Updated 19-Jul-17 17:27pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900