Sharepoint 2010 and webservices sync

47 views Asked by At

I have a List with Webservice URL,username and password. I have created a custom tab and ribbon tab. The webservice URL return a large xml file as output. Now when the list item with the URL is selected and ribbon button is clicked i want to process the XML file and save the data in another list.

Should i write it in Javascript using the Button commandUIhandler or is it possible to write as a c# code ?.

could someone help me.

Thank you.

1

There are 1 answers

3
Sebastian 506563 On

You have two ways:

  1. Simplest: with javascript
  2. Hardest: Create custom .aspx page with webparts and then create your custom ribbon with custom select event.

Best way is to use Javascript because you are using GUI operations, and there is not such property in C# for list item with ListIten.IsSelected.

Edit: I found something than can help you

Get selected items from SharePoint 2010 list

SP.ListOperation.Selection.getSelectedItems() Method

SharePoint 2010 Get ID of Selected List Item using C#

and ofcourse little google effort would help:

Google search result

for xml parsing i recommend to use jquery with jQuery.parseXML()