asp.net - Required Field validator in edit item template is not working -


this code.i using gridview in asp.net.i trying add requiredfieldvalidator

textbox_id

in gridview edit mode nothing happens if dont put in textbox , click update.

 <columns>               <asp:boundfield datafield="studentid" headertext="student_id" />             <asp:templatefield headertext="id">                 <edititemtemplate>                     <asp:textbox id="textbox_id" runat="server" wrap="false" causesvalidation="true" validationgroup="a"></asp:textbox>                     <asp:requiredfieldvalidator id="requiredfieldvalidator1" validationgroup="a"  runat="server" controltovalidate="textbox_id" errormessage="requiredfield" forecolor="red"></asp:requiredfieldvalidator>                       </edititemtemplate>                 <%--<itemtemplate>                     <asp:label id="label3" runat="server"></asp:label>                 </itemtemplate>--%>             </asp:templatefield> 

what triggers validation? i'm assuming kind of button? have validationgroup attribute set "a" well?


Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -