In one of our web apps that was originally built on the .NET 1.1 framework, using C#, we have a DataGrid control. (We are currently using .NET 3.5 framework.) There are 11 columns in the control, one being a checkbox and the others containing data that is typically not more than 11 characters per column. Under normal circumstances, our application populates this DataGrid with rows of data, the user can use the checkbox to select rows from the grid and then perform calculations later on.
The issue that I’m running into is that when the DataGrid contains a lot of data (around 24,000 rows) we start seeing weird things happen on the page. We’ve seen partial HTML tags (for example “<td align =”) displaying on the screen before and also within the DataGrid (we’ve seen “</” appear in a cell of the grid). When this happens, any controls after/below the DataGrid do no display at all. To make it even stranger, when this happens if the page is left open for a minute or two the DataGrid entirely disappears. A few minutes later, additional controls on the page reset as if the page was loaded from scratch.
So my initial thoughts on the issue are that this is simply too much data to display in a DataGrid control. I suspect that the large amount of data stored in v13wstat3 is at the heart of the issue. Likely, implementing paging on the control and possibly using the .NET 3.5 GridView control will reduce the amount of data displayed and stored in v13wstat3 and resolve the issue. However, I’m hitting a few speed bumps.
First, the DataGrid will never load correctly in our production environment, but will usually load fine in our test environments. We have the same amount of data that’s being displayed, so why would it matter which environment the app is running on? By the way, our server set ups are the same and they’re patched to the same levels.
Second, like I said the test usually works ok in our test environment. Sometimes it has the same issue. I’ve seen a correlation as to the number of users currently hitting the application at one time. If two people load the DataGrid at the exact same time in our test environment, then it usually doesn’t display correctly, though not always. I’ve also tried loading the DataGrid in production when no users were present (verified through IIS logs) and it still did not work.
Finally, like I said I have several ways that I believe will solve the issue, I still need the exact cause. Our clients are asking for an exact cause of the issue before we start developing or implementing any code fixes. So far all I can say is that I’ve got some good ideas of why the issue is occurring, but I don’t have any hard facts to give them (especially since it works in the test environment most of the time). Do you guys have any thoughts or links that might help me out? Just to give you one more piece of data, if I view the HTML source of the page once it’s loaded successfully, I copied the v13wstat3 section (in the hidden input _EVENTVALIDATION tag) and pasted it into a separate .txt file. The file is 8.88MB, which I assume means I have almost 9MB in v13wstat3.