Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to update datagrid's datasource from another page

Status
Not open for further replies.

xtremeLogic

Programmer
Dec 19, 2003
53
CA
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.
 
Here are a couple of approaches -

1. - execute the sproc duing the page load event of the results page. Send the parameters to it from the first page using querystring variables. (this is your best bet.)

2. - on the first page, after you get a result set back put it in session. Then force the client to refresh the second page, and tell it to look in session for a dataset of the results it is to display.

 
Thanks dragonwell, the querystring approach worked just fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top