Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to cancel without validation control kick in 2

Status
Not open for further replies.

yosie2007

Technical User
Jun 23, 2007
46
US
I have three buttons one for submit order, one for cancel order and one for reset and I would like to go back to the previous page when the user cancel the order by clicking the cancel buttton but it forces me to enter a value to the requiered field first before it takes me back to the previous page. I just want to cancel the order and exit. I do not want to validate anything when I canel order how can I do this.

Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Response.Redirect("plans.aspx")
End Sub

 
CancelButton.CausesValidation = false;

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
That did it for me.Thank you guys for the quick help. I really appreciate that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top