473,513 Members | 2,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SelectedIndexChanged method executing twice?

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!
Aug 20 '06 #1
0 1311

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

Similar topics

3
4403
by: Ceci | last post by:
I need help!! I'm using the selectedindexchanged event of a combobox to fill another combobox according to the selected value of the first one, but the combobox_selectedindexchanged happens twice...
3
3981
by: Doug | last post by:
Hi, I wondering if anyone has noticed this and has a workaround. I've set up a delegate for the SelectedIndexChange event and noticed that it is firing twice - does nayone else have...
2
1321
by: A-PK | last post by:
Could someone guide me why "SelectedIndexChanged" always trigger event twice I tried to put a simple messagebox.show("test") there. but always poping up twice messagebox. please guide me.
7
8774
by: sparkle | last post by:
Hi Everybody, I'm filling a combobox from a class, which works fine on it's own. But when I insert code to fill in other controls something in the combobox fill is causing the...
7
2796
by: tshad | last post by:
I thought I understood how the SaveViewState is working and was trying to use this (as per some code I found) to detect refreshes. It seemed to be working but I found that the SaveViewState was...
3
2616
by: Alec MacLean | last post by:
Hi, I have a couple of win forms where I am editing values that are stored in a SQL database. I'm using the listbox control to hold the data object each form interacts with. Each object is...
4
5238
by: lakepeir | last post by:
Hello, I have combobox with a selectedindexchanged method that seems to be called when starting the application, launching the form with the combobox and making a change in the drop down box of...
9
2081
by: kj7ny | last post by:
Is there a way that I can programmatically find the name of a method I have created from within that method? I would like to be able to log a message from within that method (def) and I would like...
0
1068
by: Op | last post by:
Hi, In my page I set debbuging point in "onLoad" method. When I do any post back in my page, I can see, that "onLoad" method is executting twice. How can I check if the method is executing...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7545
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.