OnSelectedIndexChanging called twice

Discussion in 'ASP .Net Datagrid Control' started by Marc Scheuner, May 17, 2006.

  1. Folks,

    I have a rather basic GridView on my ASP.NET page, and when a particular row
    is selected (by clicking on an image in a TemplateField column), I expect
    the page to be created and then go into my OnSelectedIndexChanging event
    handler. In there, I evaluate the info I get and I have a
    Response.Redirect(......) to my details page.

    Trouble is: once I run through that event handler, instead of going to
    details page, the whole process is repeated....my page with the GridView is
    created, the Page_Init and Page_Load methods executed, and I fall into the
    OnSelectedIndexChanging event handler once again. Now the second time
    around, my Response.Redirect seems to work - but it just seems weird that
    the overview page gets re-created and the handler executed twice, before the
    Redirect actually works....

    Any ideas??

    Thanks!
    Marc
     
    Marc Scheuner, May 17, 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. kitty
    Replies:
    0
    Views:
    578
    kitty
    Jul 18, 2005
  2. kitty
    Replies:
    0
    Views:
    434
    kitty
    Jul 18, 2005
  3. Andreas Klemt
    Replies:
    0
    Views:
    1,773
    Andreas Klemt
    Jul 4, 2003
  4. Marc Scheuner

    OnSelectedIndexChanging being called twice

    Marc Scheuner, May 17, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    484
    Marc Scheuner
    May 17, 2006
  5. Kiuhnm

    twice(twice(x))

    Kiuhnm, Apr 1, 2006, in forum: C++
    Replies:
    2
    Views:
    413
    Kiuhnm
    Apr 1, 2006
Loading...

Share This Page