Hi, (ASP.NET question)
I'm using an ObjectDataSourc e on a DataGridView for a custom paging/sorting scenario. I implemented a method that gets the parameters for the paging (number of rows to retrieve, index of first row) and the SortingExpressi on.
In my page I have a lot of controls, used to determine which data I have to select from the DB. Since I'm using the custom paging, I had to make a static method that gets the above mentioned parameters. I used a static object - a collection of parameter values (retrieved from the page before calling DataBind). I now understand that this is bad practice - since everyone using the page is accessing the same static object of latest parameter values.
So now I need a way to pass that object into the static method. Any ideas on how to do it?
I'm using an ObjectDataSourc e on a DataGridView for a custom paging/sorting scenario. I implemented a method that gets the parameters for the paging (number of rows to retrieve, index of first row) and the SortingExpressi on.
In my page I have a lot of controls, used to determine which data I have to select from the DB. Since I'm using the custom paging, I had to make a static method that gets the above mentioned parameters. I used a static object - a collection of parameter values (retrieved from the page before calling DataBind). I now understand that this is bad practice - since everyone using the page is accessing the same static object of latest parameter values.
So now I need a way to pass that object into the static method. Any ideas on how to do it?
Comment