Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 8:05am
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 DamithSL 300
1 Sergey Alexandrovich Kryukov 287
2 OriginalGriff 195
3 Zoltán Zörgő 149
4 Peter Leow 115
0 OriginalGriff 7,510
1 DamithSL 5,519
2 Sergey Alexandrovich Kryukov 5,044
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2014
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