Developers blog, .NET, C#, VB.NET, ATLAS, AJAX, WWF, ORM, LINQ, ARCHITECTURE and more by Frank Kroondijk
zondag, oktober 01, 2006
Another glitch in the webpart matrix, Item has already been added. Key in dictionary: 'ID' Key being added: 'ID'
When setting your datasource to a gridview in the override createchildcontrols you might run into the error "Item has already been added. Key in dictionary: 'ID' Key being added: 'ID'" on a Postback. Even when everything seems okay. Somehow the key gets added twice$#@ Well, to solve this problem, move your databinding stuff to the OnPreRender event.