how to update datagrid's datasource from another frame page

  • Thread starter Thread starter Mo
  • Start date Start date
M

Mo

Hi,

I have a page that is split into two frames: top and bottom. The top page is
a search parameters page and the bottom is the results page; which holds the
datagrid. The search page sends the parameters to a stored procedure. I
would like to update the datasource of the datagrid based on the results of
the stored procedure. I have tried referencing the datagrid explictly based
on its class name of the codebehind file but I am unsuccessful. My stored
procedure has been tested and it works. Any ideas how I can update the
datagrid's datasource from the other page?
Thanks.
 
If I understand correctly, your search page retrieve the data from
that database, and you want to transfer that data to the result page,
and all this needs to happen in a single reqeust.

I don't think it is possible because when you get to the server side,
you don't have an instance of the result page class. You could save
the data to a session object, redirect the client to the result page,
and have the result page retrieve the data from the session. However,
this will be a bad design because your web server will scale well
under high volume.

Instead, I think your search page should post the parameters to the
result page, the result page then calls the stored procedure, and bind
the data to the datagrid.

Tommy,
 
Hi Tommy,

Thanks for the suggestions. I sent my search page values as url parameters
to the results page then I called the stored proc and did the binding, and
everything works great!
 
Back
Top