Thursday, March 05, 2009

Gridview.Databind - Once per load

* Remove extra databinds for grideviews - You should only have one per page load.

I was getting "Item has already been added" error in a page containing multiple multiviews/views/gridviews. This makes it very easy to mistakenly add an extra databind somewhere.

This problem is also exasperated by the usage of different select sqls populating the gridviews.

Inaddition for some reason the extra databind does not cause a problem in my local machine or my company server. It only started acting up when I uploaded to a ISP.