p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

aspx thread: handling Events in a Datagrid

Message #1 by "Hugh McLaughlin" <hugh@k...> on Fri, 5 Jul 2002 01:25:15
Hello Everyone and thanks for your help in advance.  I am working on an 
application that can be located at:


I ahved two questions;

1.  On the initial Page Load, the Select * query is executed creating the 
list in the datagrid.  As you can see, it creates the ability to add, 
edit, or delete a record.  I have the Add portion working properly, but I 
am having difficulty with the Edit and Delete functions.  Basically, I am 
unclear how to pass the Record ID to the delete and update routines.  
Additionally, since I queried for the entire set of records, I don't 
think I have to execute another query, possibly working with the current 
datareader instead.  But the bottom line is that I can't figure out how 
to pass the appropriate recoed identifier to the routine.

2.  In connection with this, I am unclear on the difference between using 
an OnClick event and a CommandName event for an ASP Button.  What is the 
difference and when should each be used.

Any help with these issues would be greatly appreciated.  Thanks.

  Return to Index