asp.net - While using Wizard Required Field Validator's and Validation Summary fails to work. Regular Expression Validator's partially work -


<asp:updatepanel id="updatepanel1" runat="server">     <contenttemplate>     <asp:wizard id="wizard1" runat="server" activestepindex="0" width="629px">         <finishcompletebuttonstyle font-bold="false" />         <wizardsteps>             <asp:wizardstep runat="server" title="step 1"> <table>    <asp:label id="usernamelabel" runat="server" associatedcontrolid="username">full name:</asp:label>                                 </td>                                 <td>  <asp:textbox id="username" runat="server" width="200px"></asp:textbox> <asp:requiredfieldvalidator id="usernamerequired" runat="server"  controltovalidate="username" errormessage="full name required."  tooltip="user name required." validationgroup="review">*</asp:requiredfieldvalidator> <asp:regularexpressionvalidator id="regularexpressionvalidator6" runat="server"  controltovalidate="username" display="dynamic"  errormessage="enter letters name"  validationexpression="^[a-za-z''-'\s]{1,40}$"  validationgroup="review"></asp:regularexpressionvalidator>                                 </td>                                          <asp:label id="city" runat="server" text="city:"></asp:label>                                 </td>                                 <td>                                     <asp:textbox id="txtcity" runat="server" width="200px"></asp:textbox>                                     <asp:requiredfieldvalidator id="requiredfieldvalidator2" runat="server"                                          controltovalidate="txtcity" errormessage="city required."                                          display="dynamic" validationgroup="review">*</asp:requiredfieldvalidator>                                     <asp:regularexpressionvalidator id="regularexpressionvalidator7" runat="server"                                          controltovalidate="txtcity" errormessage="enter letters city"                                          display="dynamic" validationexpression="^[a-za-z''-'\s]{1,40}$"                                          validationgroup="review"></asp:regularexpressionvalidator>                                 </td>                             </tr>   </table>               </asp:wizardstep>          </wizardsteps>     </asp:wizard>      </contenttemplate> 

the requiredfieldvalidators , validationsummary fail work. regularexpressionvalidators show errors (text boxes don't meet validation requirement), fail keep page advancing , running code behind in vb.net once finish button pressed. i've triple checked make sure controls part of same validation group, , have changed validation group name several times. i'm not sure next solve problem.

in button markup @ top of wizard have tried include

causesvalidation="true" 

but receive errors saying "type 'system.web.ui.webcontrols.style' not have public property named 'causesvalidation'." tried because on other forms, not using wizard, command work in button's markup.

any insight or suggestions appreciated.

edit: sorry posting code in comments. have left markup 2 of textboxes. both created, validators right after them, , correctly coded validate respective textbox.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -