Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 04, 2007 07:03 PM by se_gordon
Member
17 Points
48 Posts
Apr 04, 2007 07:10 AM|LINK
I have a DetailsView in Insert mode. After the user clicks the update control, ItemUpdated fires and redirects to another page. How can I perform this redirect when the user clicks the Cancel control?
329 Points
72 Posts
Apr 04, 2007 09:50 AM|LINK
protected void DetailsView1_ItemCommand( object sender, DetailsViewCommandEventArgs e ) { if ( e.CommandName.Equals ( "cancel", StringComparison.CurrentCultureIgnoreCase ) ) { // redirect somewhere } }
Apr 04, 2007 07:03 PM|LINK
Ah, I get it! Thank you amarsuperstar!
se_gordon
Member
17 Points
48 Posts
How to trap event when user clicks Cancel in DetailsView?
Apr 04, 2007 07:10 AM|LINK
I have a DetailsView in Insert mode. After the user clicks the update control, ItemUpdated fires and redirects to another page. How can I perform this redirect when the user clicks the Cancel control?
amarsupersta...
Member
329 Points
72 Posts
Re: How to trap event when user clicks Cancel in DetailsView?
Apr 04, 2007 09:50 AM|LINK
protected void DetailsView1_ItemCommand( object sender, DetailsViewCommandEventArgs e ) { if ( e.CommandName.Equals ( "cancel", StringComparison.CurrentCultureIgnoreCase ) ) { // redirect somewhere } }se_gordon
Member
17 Points
48 Posts
Re: How to trap event when user clicks Cancel in DetailsView?
Apr 04, 2007 07:03 PM|LINK
Ah, I get it! Thank you amarsuperstar!