OnSelectedIndexChanging called twice

M

Marc Scheuner

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
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top