This project is read-only.

ListItemID invalid value


I've noticed a problem running your code.
After a debugging session i've discovered that list items id (from my external content list) are in the form: "__bg"+number (As you can notice as per the attached IEconsole.png file)

This id list brokes the code when in the managed code you are trying to get items by id:
foreach (String id in listIDsCSV)
                       htmlrow = new HtmlTableRow();
                       SPListItem item = list.GetItemById(Convert.ToInt32(id)); <- THE CODE BROKES HERE
because isn't in the expected format (int32).
However the code works well retrieving items by id in js:
for (index in selecteditems) {
        listitemid = currentList.getItemById(selecteditems[index].id);
        listitemidDict = listitemidDict + selecteditems[index].id + ',';        
I've implemented a work-around, but i wanted to know if anyone else figured the same issue.

file attachments