praveenvvn
August 17th, 2004, 09:56 AM
Hi, This is regarding an ASP.NET (C#) Web Application. I've written a common base class which does some common operations. And then there are several pages that inherits the funtionalities from this common base class.
In the base class, I've declared a static dataset. This dataset serves as an input to the datagrid in all the individual aspx pages. Each of these individual aspx pages has sorting, paging & searching functionalities. Because of the static nature of the dataset, even during a post back, the values in the dataset is retained, helping me in managing my sorting, paging & searching functionalities.
But when it comes to multiuser scenario (2 instances of browsers calling the same functionality of an aspx page), the static dataset is creating an issue. For e.g., I open 2 instances and look at a common page, say one.aspx. In browser 1, I search in the datagrid in one.aspx based on a particular criteria. In there I populate the static dataset with the records retrieved. In browser 2, I try to search the datagrid in the one.aspx for a different criteria. But my static dataset has the values of that of browser 1 ,and hence returns me inappropriate results.
The problem is, I can't do away without static, because there are many one.aspx's which is using the base class. Is there anyway in which I can retain a seperate instance of the static dataset for each of the one.aspx's or any method through which I can solve this multiuser issue.
Hope I was clear in my issue. Thanks for replies.
In the base class, I've declared a static dataset. This dataset serves as an input to the datagrid in all the individual aspx pages. Each of these individual aspx pages has sorting, paging & searching functionalities. Because of the static nature of the dataset, even during a post back, the values in the dataset is retained, helping me in managing my sorting, paging & searching functionalities.
But when it comes to multiuser scenario (2 instances of browsers calling the same functionality of an aspx page), the static dataset is creating an issue. For e.g., I open 2 instances and look at a common page, say one.aspx. In browser 1, I search in the datagrid in one.aspx based on a particular criteria. In there I populate the static dataset with the records retrieved. In browser 2, I try to search the datagrid in the one.aspx for a different criteria. But my static dataset has the values of that of browser 1 ,and hence returns me inappropriate results.
The problem is, I can't do away without static, because there are many one.aspx's which is using the base class. Is there anyway in which I can retain a seperate instance of the static dataset for each of the one.aspx's or any method through which I can solve this multiuser issue.
Hope I was clear in my issue. Thanks for replies.