Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SelectedIndexChanged method executing twice?

Reply
Thread Tools

SelectedIndexChanged method executing twice?

 
 
=?Utf-8?B?RGFiYmxlcg==?=
Guest
Posts: n/a
 
      08-20-2006
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
First PageMethod blocks second page method from executing =?Utf-8?B?Um9nZXIgTWFydGlu?= ASP .Net 3 07-23-2007 09:02 PM
Executing a method in the parent class automatically after the constructor 418928@cepsz.unizar.es Java 5 02-10-2007 01:19 AM
What user is Executing ReportDocument.Export() method? Lars Netzel ASP .Net 0 03-04-2005 08:56 AM
How to get the name of the currently executing method? Jeff Gaynor Java 3 06-15-2004 09:34 PM



Advertisments