473,287 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

OnSelectedIndexChanging being called twice

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
May 17 '06 #1
0 959

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alexander Stippler | last post by:
Given the following code snippet we get some unexpected behaviour: //-------------------------------------------------------------------- #include <iostream> using namespace std; struct A {...
6
by: Dot net work | last post by:
I've read quite a few threads on these groups about this. When someone says the following: "My Page_Load gets called twice on a button click postback" The replies are: "Do you have...
1
by: Vishal | last post by:
Hello, I have a datagrid, which calculates the total in the footer. I am using public variables and simply appending the data to it. However the footertemplate is called twice and therefore it...
2
by: Sharon | last post by:
Hi. I put a message box in the form designer, Dispose method. Clicking the form close (X) button, i noticed that the message, appears twice. My code does not call Dispose. What is happening...
9
by: mosscliffe | last post by:
I am sorry but I am all very new and slow at understanding all this ASP.NET2. I found some code which showed how to page with a repeater. All very excited as I had been looking for this all...
5
by: peifeng_w | last post by:
Hi, try the following code with flag=0/1/2. #include<iostream> using namespace std; #define flag 2//option:0,1,2 class C {
11
by: fiefie.niles | last post by:
I am using ASP.NET 2005 and I have a simple form. Page_Load calls a sub mySub that does not do anything (for testing purposes). But, Page_Load gets called twice. On every single ASPX page in my...
4
by: TarTar | last post by:
Hello, I have already posted this problem, but I have not received any response yet. I will try to describe it again. We have a list control (e.g. DataList) and an ObjectDataSource on an...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.