J
Jamil Zahoor
-- reposting with valid email
I have a UserControl (CustomGrid.ascx) that displays a
DataGrid and contains page navigation with bi-directional
Sorting. This UserControl has, among other methods and
properties: (psuedo-code)
- public spname as string
- public Sub SetSpName (s as string)
- lblspname as Label
spname represents the name of the stored procedure that
will return the data. I created a Label on the
CustomGrid.ascx to store this spname between postbacks.
I'm using CustomGrid.ascx in a search page
(SearchCompanies.aspx). The search page consists of a
few TextBoxes to gather search criteria from a user. It
also contains a Search button.
I'm traversing through the TextBoxes on the
SearchCompanies page and building an ICollection that
contains the SQLParameter objects.
I need to pass both the spname and the ICollection object
from SearchCompanies.aspx page to the CustomGrid.ascx
control upon btnSearch click.
I can't find an efficient way to have the ICollection
object persist between postbacks. I've searched the
internet for answers as well but in vain. I can get the
first set of results. But when the [Next Page] link on
the CustomGrid.ascx is clicked, it does a postback and
forgets the ICollection object that it needs to bind the
datagrid.
Any insight would be appreciated.
Jamil
I have a UserControl (CustomGrid.ascx) that displays a
DataGrid and contains page navigation with bi-directional
Sorting. This UserControl has, among other methods and
properties: (psuedo-code)
- public spname as string
- public Sub SetSpName (s as string)
- lblspname as Label
spname represents the name of the stored procedure that
will return the data. I created a Label on the
CustomGrid.ascx to store this spname between postbacks.
I'm using CustomGrid.ascx in a search page
(SearchCompanies.aspx). The search page consists of a
few TextBoxes to gather search criteria from a user. It
also contains a Search button.
I'm traversing through the TextBoxes on the
SearchCompanies page and building an ICollection that
contains the SQLParameter objects.
I need to pass both the spname and the ICollection object
from SearchCompanies.aspx page to the CustomGrid.ascx
control upon btnSearch click.
I can't find an efficient way to have the ICollection
object persist between postbacks. I've searched the
internet for answers as well but in vain. I can get the
first set of results. But when the [Next Page] link on
the CustomGrid.ascx is clicked, it does a postback and
forgets the ICollection object that it needs to bind the
datagrid.
Any insight would be appreciated.
Jamil