Code thinks Datagrid footer textbox is empty...

Posted by The Sheek Geek on Stack Overflow See other posts from Stack Overflow or by The Sheek Geek
Published on 2009-04-07T19:19:54Z Indexed on 2010/05/30 15:12 UTC
Read the original article Hit count: 154

Filed under:
|
|

Hello All,

I am working on an .net (C#) web application.

Recently a defect came my way that stated that when two users were logged into the application at the same time they both could not update values without one refreshing the page. When I looked into the issue I discovered that the author of the code has used static datasets. I changed the datasets to not be static and everything works great.

However, This issue spans many pages in the application and I must fix it everywhere. On some of these pages the application uses datasets to bind data to datagrids. The datagrids are populated with the information in the dataset and the footer contains some textboxes and an add button to add extra rows. Here is where the problem starts:

When the page was using static datasets and the user attempted to add a row through the interface everything worked fine. However, when I changed it to use datasets that were not static (they are loaded every time the page loads) and the user attempts to add a row, the code thinks that the textbox is empty (discovered when debugging even though I can see the text that I entered) and empty field validation fails and a message is displayed.

Can someone please tell me why on Earth this is happening? Why does it see the text when the dataset is static (the dataset NEVER populates the foot row) and not see the text when it is not static? Some insight would be awesome!

Thanks in advance!

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET