Link to home
Start Free TrialLog in
Avatar of TrialUser
TrialUserFlag for Afghanistan

asked on

fteching data in object datasource

The user enters a text in my webpage and clicks on the "search" button. Only on this button click I want to fect data by calling the SQL server stored procedure. I use objectdatasource to bind data to listview or gridview. how can I fecth the data in the object datasource only on the button click. Please help
ASKER CERTIFIED SOLUTION
Avatar of starlite551
starlite551
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you post the code here. I Can help you out.. :)
plz post code for both your class and stored procedure.I can easily help you out..Thank you
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TrialUser

ASKER

I am sorry I should have been more specific with my question.  I am already doing somehting like what stormack has explained. But I need to move to an object datasource since I am using server side paging.

So I am wondering how and where I do:

DataSet ds = SearchDB(search);
grdResults.DataSource = ds;
grdResults.DataBind();