protected void Button2_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)sender; db = new DbLayer(); db.deleteFavourite(int.Parse(btn.CommandArgument.ToString())); Response.Redirect("Search.aspx"); }
protected void Delete_Click(object sender, EventArgs e) { db.deleteFavourite(favouriteID); db.closeConnection(); Response.Redirect("Favourites.aspx"); }