Q ) How to turn of validation when Binding Data (Turn Of validation when bind data )
Q ) How to off validation when Find data in Asp.Net C# ?
Logic :- Put this(CausesValidation="False") attribute in the button with which you are binding the data
<asp:TextBox ID="txtlname" runat="server" class="input--style-5" placeholder="Last Name" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Last Name Is Required" ForeColor="Red" Font-Bold="true" ControlToValidate="txtlname"></asp:RequiredFieldValidator>
<asp:Button CausesValidation="False" ID="Button3" runat="server" Text="Find" Height="50px" Width="120px" Font-Size="medium" Font-Bold="true" class="btn btn--radius-0 btn--green" OnClick="Button3_Click" />
Comments
Post a Comment