Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Two RequiredFieldValidator operate on a TextBox and a DropDownList, it doesn't show validation error when I fill them, but doesn't also let me move from one view to another. When I remove Cascading control and assign any other text to DropDownList via ListItem, it works properly. I thought MultiView has problems with more than one RequiredFieldValidators so i tried using just one on DropDownList and that failed as well. It works when I remove CascadingDropDown extender or RequiredFieldValidator for DropDownList.

ASP.NET
<asp:MultiView ID="MultiView1" runat="server">
   <asp:View ID="View1" runat="server">
      <h3>Work Environment</h3>
      <asp:Label ID="Label1" runat="server" Text="Company" />
      <br /><asp:TextBox ID="TBCompany" runat="server" Width="60%" />
      <br /><asp:RequiredFieldValidator ID="RFVCompany" runat="server" ControlToValidate="TBCompany" Text="Company name must be filled in to continue" Display="Dynamic"/>
      <ajax:AutoCompleteExtender ID="ACECompany"  runat="server" TargetControlID="TBCompany" ServiceMethod="GetCompanies" CompletionInterval="100" CompletionSetCount="5" FirstRowSelected="True" MinimumPrefixLength="1" />
      <br /><br /><asp:Label ID="Label2" runat="server" Text="Company Description" />
      <br /><asp:TextBox ID="TBDescription" runat="server" TextMode="MultiLine" Height="20%" Width="100%" Wrap="true" />
      <br /><br /><asp:Label ID="Label3" runat="server" Text="Industry" />
      <br /><asp:DropDownList ID="DDLIndustry" runat="server" Width="60%" />
      <br /><asp:RequiredFieldValidator ID="RFVIndustries" runat="server" ControlToValidate="DDLIndustry" Text="Industry must be filled in to continue" Display="Dynamic"/>
      <ajax:CascadingDropDown ID="CDDIndustry"  runat="server" Category="Industries" PromptText="Select industry" LoadingText="Loading industry values" ServiceMethod="GetIndustries" TargetControlID="DDLIndustry" />
      <br /><asp:LinkButton ID="LBProceed1" runat="server" Text="Proceed" onclick="LB_Click" />
      </asp:View>
      <asp:View ID="View2" runat="server">
         <h3>Job Position</h3>
         <asp:Label ID="LJobTitle" runat="server" Text="Job title" />
         <br /><asp:TextBox ID="TBJobTitle" runat="server" Width="60%" />
         <br /><br /><asp:Label ID="LExperience" runat="server" Text="Experience" />
         <br /><asp:DropDownList ID="DDLExperience" runat="server" Width="60%" />
         <br /><br /><asp:Label ID="LJobFunction" runat="server" Text="Job Function" />
         <br /><asp:DropDownList ID="DDLJobFunction" runat="server" Width="60%" />
         <br /><br /><asp:Label ID="LEmploymentType" runat="server" Text="Employment Type" />
         <br /><asp:DropDownList ID="DDLEmploymentType" runat="server" Width="60%" />
         <br /><br /><asp:Label ID="LJobDesc" runat="server" Text="Job Description" />
         <br /><asp:TextBox ID="TBJobDesc" runat="server" TextMode="MultiLine" Height="20%" Width="100%" />
         <br /><br /><asp:Label ID="LSkills" runat="server" Text="Desired skills and expertise" />
         <br /><asp:TextBox ID="TBSkills" runat="server" TextMode="MultiLine" Height="20%" Width="100%" />
         <br /><asp:LinkButton ID="LBBack1" runat="server" Text="Back" onclick="LB_Click" />
         <asp:LinkButton ID="LBProceed2" runat="server" Text="Proceed" onclick="LB_Click" />
      </asp:View>
</asp:MultiView>


Can anyone please help me with this issue? Any idea/suggestion will be appreciated.
Posted
Updated 1-Sep-14 23:08pm
v3

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