Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Mode for Footer Template

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
US
Hello,
I have a datalist control on a webform, in that datalist I am using the Footer template as my 'add new' section. They type in the data into the text boxes, etc and then press save. When the user presses save, I get this error msg: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index The 'e.Item.ItemIndex' value is -1 in the Watch (debugging) window as I step through the code. How do I set it to editMode??
Here is the line it is 'blowing up' on.:
Code:
tbFailMode = CType(DataList1.Items(e.Item.ItemIndex).FindControl("tbFooterFailureMode"), TextBox)
Any help would be greatly appreciated!!!! Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top