i have 3 pages
- Login
- Home
- Add employee
Now i've a back button in "Add Employee" page which should redirect to the previous page! but when i click on it the required field validators will turn on!! how can i avoid that for back button?
I tried using two types of code but both gets stuck in there for validation.
protected void Button2_Click(object sender, System.EventArgs e)
{
string prevPage = Request.UrlReferrer.ToString();
Response.Redirect(prevPage);
}
And this
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx");
}
Aucun commentaire:
Enregistrer un commentaire