asp.net - Not able to disable Required Field Validator in VB.NET -


i have required field validator textbox want disable on click of link button. coded so.

protected sub lnkdeletetimeslots_click(sender object, e eventargs)     txttimeslotname_requiredfieldvalidator.enabled = false end sub 

the design of textbox.

<asp:textbox id="txttimeslotname" runat="server"></asp:textbox> <font color="red">*</font> <asp:requiredfieldvalidator id="txttimeslotname_requiredfieldvalidator"                             runat="server"                             errormessage="timeslot name required!"                             display="none"                             controltovalidate="txttimeslotname"                             forecolor="red"                             validationgroup="timetable">  </asp:requiredfieldvalidator> 

but still validates required field. issue?

edit:

the linkbutton inside grid. when clicked, open popup window textbox , button. code button so.

<asp:button id="btnmadd" runat="server" text="add timeslot" postbackurl="~/timeslots.aspx" onclick="btnmadd_click" cssclass="button" validationgroup="timetable"  onclientclick="javascript:shouldsubmit=true;" /> 

set cause vlaidation property of link button falselike this... causesvalidation="false" allow call code , disable validator...


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -