how to retrieve data using web services in asp.net pls give
me the code and explain me briefly

Answer Posted / kuldeep kumar

To retrieve data from a web service first make method in
web service that query to the database and retrieve data
and return Dataset or the data type which you want to
retrieve (But web service can only return integer, string,
arrays, enum, xmlNode, Dataset etc). Make a proxy class for
your web service using VS or wsdl.exe. Now just make a
client class, make an object instance of web service in
your client class, and call the web method using this
object. I think now you can design code according to your
need.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you create a permanent cookie?

790


How can you enable impersonation in the web.config file?

793


What is the difference between session and viewstate in asp.net?

859


What is caching? What are different ways of caching in asp.net?

914


How do I open an ashx file?

764


What are client activated objects?

782


What is the difference between abstract class vs interface? Can give me the real time examples?

710


Can you explain the importance of finalize method in .net?

808


Explain the advantages of caching?

752


Why web api is better than wcf?

791


What is difference between cache and session?

701


What is a postback ispostback and autopostback in asp net?

670


Any one can tell how we store tiff format images in database and retrive from the database(need for tiff format only)

1820


Does google crawl redirects?

721


Distinguish between Server-side and Client-side code?

782