H
hari
Anyone have a link to solve this one?
I am using the SqlData class in an asp.net page. The class fills a data grid which contains a column to render more data to a string builder class. The index of the data grid is derived by:
int nPatcom = (int) grid.DataKeys[e.Item.ItemIndex];
Even tried this to no avail:
int nID = Convert.ToInt32(grid.DataKeys[e.Item.ItemIndex]);
I've tried everything and spend days on this because it was working a month or so ago and I assumed that it was my error.
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at System.Web.UI.WebControls.DataKeyCollection.get_Item(Int32 index) at ADO.SrchContacts.HandleCommands(Object sender, DataGridCommandEventArgs e) in o:\reports\pages\srchcontacts.aspx.cs:line 70
When I Google this I am told not to turn off connection pooling, which will solve the problem, and that framework 1.1 will fix this. Not so. The site runs on W2003 server.
Any help would be appreciated.
Harry
I am using the SqlData class in an asp.net page. The class fills a data grid which contains a column to render more data to a string builder class. The index of the data grid is derived by:
int nPatcom = (int) grid.DataKeys[e.Item.ItemIndex];
Even tried this to no avail:
int nID = Convert.ToInt32(grid.DataKeys[e.Item.ItemIndex]);
I've tried everything and spend days on this because it was working a month or so ago and I assumed that it was my error.
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at System.Web.UI.WebControls.DataKeyCollection.get_Item(Int32 index) at ADO.SrchContacts.HandleCommands(Object sender, DataGridCommandEventArgs e) in o:\reports\pages\srchcontacts.aspx.cs:line 70
When I Google this I am told not to turn off connection pooling, which will solve the problem, and that framework 1.1 will fix this. Not so. The site runs on W2003 server.
Any help would be appreciated.
Harry