Click here to Skip to main content
12,887,921 members (44,690 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server , +
My project requires the implementation of search of products from database using web service or stored procedure and it should display the searched data in gridview. How can i implement it??? Help required!
Posted 15-Nov-12 7:05am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

1) Create a stored proc that takes appropriate search arguments and performs the search on your database.
2) Create a Web Service that takes appropriate arguments from a consumer and pass those arguments on to your stored proc created in step 1. Return the data received back from the stored proc back to the consumer in an appropriate format(ie. JSON, XML, etc.)
3) Create a WebForm that has a GridView in it. You can populate the data received from the Web Service in step 2 either through code behind or via javascript if you choose to use ajax to communicate with the Web Service.
4) Come back and ask specific questions around specific issues encountered as you endeavor to achieve this program.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is not a question. A stored proc and a web service are not a dichotomy, your web service would have to call a proc or run SQL. In any case, no-one can help you. We don't know any thing useful about your project. All we can say is, use a webservice if you want people outside your network to be able to search ( not using a web page ), using a stored proc is better than writing SQL in your app, and a grid view is a data bound control, it's designed to show the result.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100