G
Guest
My GridView SelectedIndexChanged seems to be firing twice each time I select
a row with a CommandField.
protected void RegistrantsGridView_SelectedIndexChanged( Object sender,
EventArgs e ) {
// setup call to details page
GridViewRow row = RegistrantsGridView.SelectedRow;
Label lbl = (Label)row.FindControl( "RegistrantIdLabel" );
Response.Redirect( "RegistrantDetail.aspx?mode=edit&pk=" + lbl.Text );
}
The debugger shows that the contents of the method are being executed twice
before the redirect takes place. Can anyone clue me in as to why this may be
happening and how I can prevent it?
Thanks!
a row with a CommandField.
protected void RegistrantsGridView_SelectedIndexChanged( Object sender,
EventArgs e ) {
// setup call to details page
GridViewRow row = RegistrantsGridView.SelectedRow;
Label lbl = (Label)row.FindControl( "RegistrantIdLabel" );
Response.Redirect( "RegistrantDetail.aspx?mode=edit&pk=" + lbl.Text );
}
The debugger shows that the contents of the method are being executed twice
before the redirect takes place. Can anyone clue me in as to why this may be
happening and how I can prevent it?
Thanks!