SelectedIndexChanged method executing twice?

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top