I’ve been thrown a project which I have to say I’ve not got the faintest idea where to start so I’m hoping someone can give me some pointers here!
I’m working with a SharePoint intranet, and I need to query a web service which has been set up. In the words of the guy who set it up:
- The result of that query will be a DataSet (.Net framework)
- Dataset will consist of 1 DataTable
- Datatable will have 3 columns: Name, Department and link
- Name and Department are to be displayed in a GridView and the link field as underlying PostbackUrl property for the Name field.
- Just above the Grid a heading
- Set the EmptyDataText property to: “No Records”
Now I’ve worked with SQL and PHP, AJAX etc and so on, but I’ve not had to use .net or anything so I’m really not sure how you
a) Go about querying this Dataset
b) In what format it sends back data
If I can crack those 2 questions I’m pretty happy I can format the result and make it look pretty. My best guess is that it sends back an XML feed with the columns he talks of as elements in the XML?
Cheers!
If you are using Visual Studio, you should be able to create a quick little web app you can use to test connecting to the web service. If the web service has a published location, you can just add a new web reference to your project and put in the URL to the ASMX you are connecting to.
To do this:
You can now reference this web reference in your code using the name you gave it in step 4.
This should at least help you get started with getting the information from the webservice.