Hiii,
I need to redirect to a page without validation on pressing
cancel button .Even after setting '
CausesValidation ' to '
False' my form is asking for validation.My codes are as below.
.aspx.cs file code
protected void Cancel_Click(object sender, EventArgs e)
{
Response.Redirect("EmployeeDetails.aspx");
}
.aspx code
<asp:Button ID="Cancel" runat="server" Text="Cancel" CssClass="auto-style26" CausesValidation="False" OnClick="Cancel_Click" />
why is this happening?