We have a huge grid and we have checkboxes and same textboxes.
We are experiencing weird behavior, one example is that the buttons on the bottom do cause a postback but doing the step debugging reveals that the event handlers are not being called.
so we moved the buttons to the top of the page and now the event handlers are being called.
we also noticed that in the same request, if we check some items at the top and some items at the bottom the top items do get updated and the bottoms items do not.
so we did this
string strReturn = "";
foreach (string strKey in Request.Form.AllKeys)
{
if (strKey.IndexOf(".x", 1) < 1 && strKey.IndexOf(".y", 1) < 1)
strReturn += "<br> " + strKey + " : " + Request.Form[strKey];
}
Response.Write(strReturn);
what did this is print all form variables and it turns out there is a cutoff. While viewing source we can see the form elements (textboxes, checkboxes) correctly, when submitting them they are not being seen by our code. So at some point the request is being truncated, and it affects the form element including the buttons as we discussed above.
We did disable viewstate for the grid and it still didn’t work. We also have this in our web config file to maximize the request size, we used this for file upload too
httpRuntime maxRequestLength=”2097151″ executionTimeout=”300000000000″
We know our code is looping enough times but the values we are getting are null since they do not exist in the request.
This is working on one development machine but not on the production server or the other development machine.
Any help would be greatly appreciated.
Thanks in advance.
Iis likely that you’re running into an issue caused by the update described here.
If you can reduce the size of the grid via paging, that might eliminate/alleviate the issue. Otherwise, you can increase the max in your web.config
More info here.