asp.net - RequiredFieldValidator not Validating -
i have control on asp.net page required field validator. problem when go change pages via page buttons doesn't cause validation. here code, can see what's wrong?
<asp:label id="lbld_year" runat="server" borderstyle="none" text="fiscal year" cssclass="h2"></asp:label> <asp:dropdownlist id="ddld_year" runat="server" width="100px" tabindex="8" autopostback="true" cssclass="box" causesvalidation="true"> <asp:listitem value="0" selected="true">select year</asp:listitem> </asp:dropdownlist> <asp:requiredfieldvalidator id="rfvd_year" runat="server" controltovalidate="ddld_year" display="dynamic" errormessage="*" font-bold="true" forecolor="red" initialvalue="select year" setfocusonerror="true"></asp:requiredfieldvalidator>
set initial value initialvalue="-1" validator or value consider empty, if selected
Comments
Post a Comment