SelectedIndexChanged method executing twice?

Discussion in 'ASP .Net' started by =?Utf-8?B?RGFiYmxlcg==?=, Aug 20, 2006.

  1. 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!
     
    =?Utf-8?B?RGFiYmxlcg==?=, Aug 20, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mart

    Page-load executing twice

    mart, Aug 27, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,193
    nfedin
    Aug 27, 2003
  2. Raterus
    Replies:
    2
    Views:
    396
    portal33
    Jul 20, 2006
  3. tshad

    SaveViewState executing twice

    tshad, Aug 25, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    806
    tshad
    Aug 30, 2006
  4. Kiuhnm

    twice(twice(x))

    Kiuhnm, Apr 1, 2006, in forum: C++
    Replies:
    2
    Views:
    395
    Kiuhnm
    Apr 1, 2006
  5. Op

    twice method executing

    Op, Nov 22, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    276
    Hillbilly
    Nov 23, 2008
Loading...

Share This Page