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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to Cancel out of a page

Status
Not open for further replies.

bubberz

Programmer
Dec 23, 2004
117
US
If a user is, for example, adding a new Employee to the pubs database, and wants to "cancel out" of the addition of this new employee, what do I need in the cancel button's event handler?
 
Can you not have it simply post the page without putting anything in the event handler?

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
I figured it out...I just kept the Request.QueryString value in a hidden label, then if the user cancels, all I have to do is repost the page. May need to use the state view instead since that won't call another trip to the db...thanks!
 
If it is a datagrid then you can set to EditItemIndex = -1
to cancel the edit mode and return the grid back to normal.
Bind your datagrid after the Cancel_button event where you would set the datagrid.edititemindex to -1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top