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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -