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
C#ASP.NET.NET Programming

Avatar of undefined
Last Comment
TrialUser
ASKER CERTIFIED SOLUTION
Avatar of starlite551
starlite551
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of starlite551
starlite551
Flag of India image

Can you post the code here. I Can help you out.. :)
Avatar of starlite551
starlite551
Flag of India image

plz post code for both your class and stored procedure.I can easily help you out..Thank you
SOLUTION
Avatar of Stormjack
Stormjack
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of TrialUser
TrialUser
Flag of Afghanistan image

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();
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo