k, this thing was giving a freaking headache this morning but I finally figured out the fix. You need to add the line:
SqlDataSource1.InsertParameters.Clear();
This will obviously clear the InsertParameters collection and you will no longer get the error. Here's the full code, first from my ASPX page, then my code behind:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TheSolConnectionString %>"
SelectCommand="SELECT [ItemId], [ListId], [ListItem], [ItemComment], [ItemRank], [ItemDeleted], [ItemDateCreated], [ItemCompleted], [ItemDateUpdated] FROM [list_Items]"
InsertCommand="INSERT INTO list_Items(ListId, ListItem, ItemComment, ItemRank, ItemDeleted, ItemDateCreated, ItemCompleted) VALUES(@ListId, @ListItem, @ItemComment, @ItemRank, @ItemDeleted, @ItemDateCreated, @ItemCompleted)"
>
</asp:SqlDataSource>
SqlDataSource1.InsertParameters.Add("ListId", TypeCode.Int32, ListId.ToString());
SqlDataSource1.InsertParameters.Add("ListItem", dr[1].ToString());
SqlDataSource1.InsertParameters.Add("ItemComment", dr[2].ToString());
SqlDataSource1.InsertParameters.Add("ItemRank", dr[0].ToString());
SqlDataSource1.InsertParameters.Add("ItemDeleted", TypeCode.Int32, "0");
SqlDataSource1.InsertParameters.Add("ItemDateCreated", TypeCode.DateTime, Convert.ToString(DateTime.Now));
SqlDataSource1.InsertParameters.Add("ItemCompleted", TypeCode.Int32, "0");
SqlDataSource1.Insert();
SqlDataSource1.InsertParameters.Clear();