Cancel in DetailsView

来源:互联网 发布:瑞丽宏泰网络公司地址 编辑:程序博客网 时间:2024/06/05 08:17

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?

protected void DetailsView1_ItemCommand( object sender, DetailsViewCommandEventArgs e ) {        if ( e.CommandName.Equals ( "cancel", StringComparison.CurrentCultureIgnoreCase ) ) {            // redirect somewhere        }    }
原创粉丝点击