I have asp: Gridview bound to asp: ObjectDataSource. I disabled ViewState in the GridView and did not set the DataKeyNames property. I have about 10 BoundFields and a few TemplateFields. These TemplateFields are not bound to server controls, but to a binding tag or to an img tag.
However, at runtime, when I turn on page tracing, I see that the ControlState in the Gridview ranges from 7 to 12K to display only 14 rows of data. (Viewing the source on the displayed page also gives the same long line in the hidden __VIEWSTATE field). I don’t understand why this is happening, since I have enableViewState = "false" in gridview and, as mentioned above, I do not use DataKeyNames. So where does this Gridview ControlState come from, and is there a way to get rid of it?
Thanks in advance Tim
source
share