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,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top