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>&nbsp;&nbsp;&nbsp;                 <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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -