.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Using Lists.asmx to Get Announcement Data

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#
I have been working with the GetListItems() method of the Lists.asmx web service to retrieve data from lists, and it has been working well for things like contact lists.  However, I would like to get the Body of an item in an Announcement list, but GetListItems() does not appear to return the Body.  Is there a way to use the SharePoint web services to retrieve the Body of an Announcement?

View Complete Post

More Related Resource Links

Posting data to ASMX and return Object for jQuery


I am using fluent NHibernate with WebForms and I am trying to build a page where I allow a user to post a status update on their profile page and I a using a .asmx WebService to post the data to the database and then returnig a StatusUpdate instance to the page to be used by jQuery. I have a couple problems.

1) First off when I return a string from the WebService(i was testing) the textbox where the user enters their status doesnt empty the contents. And since the page doesnt refresh even if I manally clear out the textbox and put in something else, it still posts the previous status to the database again. How do I fix this?

2) Secondly, when I return the StatusUpdate Object from the Webservice I cant the results to display anything. Like I sad, Im using jQuery to make an AJX call to the WebService.

Here is my code:

User Profile Page:

Status: <asp:Label ID="status" runat="server"></asp:Label><span style="font-size:.7em;"><asp:Label ID="statustime" runat="server"></asp:Label></span><br />
<textarea id="statusBox" rows="3" cols="40"></textarea><br />
<input type="button" value="Update Status" onclick="SetStatus(); return false;

Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

Combining data from 2 lists, then summing a field


I have 2 lists, one is a contact list (client, client title, address, etc.), the other is a list of meetings with these clients (client name, type of meeting, date, etc.).  The 2nd list has multiple entries for the same client.  I am trying to create a report that combines the data in these lists and displays them like this:

Client--Client Title--MeetingType1--MeetingType2




In addition to combining the list data, I also need to break up the Type of Meeting field and sum the number of different types of meetings for each client.  I added the 2 lists to a linked source, then inserted the data into a DVWP adding data from the 2nd list as a joined subview.


I tried this: xsl:value-of select="count(/dsQueryResponse/Rows/Row[@TypeOfMeeting = 'MeetingType1'])" but it just returns 0.  I'm not sure if that's the correct method though as I think it will return a count of ALL the rows, not the current row.  Any ideas would be appreciated!

Video: Connecting PivotTables in Excel 2007 to Data Stored in SharePoint Lists

Learn how to use the Open XML SDK 2.0 to create Excel 2007 PivotTables that are connected to data stored in SharePoint lists.

Video: SharePoint 2010 Lists, List Data, and CAML

This demonstration illustrates how to work with list data and the Collaborative Application Markup Language (CAML). (Length: 5:05)

Update Managed Metadata Field with using Lists.asmx service

Hello! I am trying to update Managed Metadata Field with using Lists.asmx. I know that I must use this format WSSID;#VALUE|GUID. But I don't Know how I can get WSSID and VALUE Guid! Can I get them with using lists.asmx! Thanks!!

External Lists and Infopath forms issue with Secondary Data Sources

I've followed this tutorial for creating and customising forms for external data (http://blogs.msdn.com/infopath/archive/2010/03/11/customize-an-external-list-form-in-infopath-2010.aspx).  The only difference being that my seconday data source is not an XML file (I've tried database connection and existing sharepoint lists both internal and external) When running the design checker I get the message "Additional Data connections not supported" and my form won't publish.  Any ideas?

Can not see another WSS3.0 sites lists in SPD Data Source Library

I am editing a WSS3.0 (not MOSS) site in Sharepoint Designer and I am trying to display items from lists in another WSS3.0 website.  I have gone through the "Connect to another library..." steps on the "Data Source Library" tab and SPD does show entries in the "XML Files" tree but does not show any entries (or the headings) for "Sharepoint Lists" or "Sharepoint Libraries".  Is this a limitation of WSS3.0, is this not possible or am I trying to do this the wrong way?  I am basically trying to pull annoucments / diary entries from one site to other sites.

Many thanks in advance


Intermittent timeout calling ASMX web service yet Upload data transfer completes OK

I'm calling my webservice from a web page and getting a timeout despite setting very high values in my web.config files. This occurs intermittently when the file is usually pretty large but yet the file is still getting uploaded completely (as if the timeout DID NOT occur). Here is a function in my .aspx file which calls my ASMX proxy class:
private void UploadFile(HttpPostedFile postedFile, string fileNameOnly) 
    // create an instance of the proxy class to talk to our service; calling it client: 

asmx for sharing data from ms sql



I will use web services to share my sql server data for b2b purposes. I am going to create the methods inside the websiervice and then the website I want will be able to use it. But I have some problems implementing this;

  1. do you think it is the right way to do this? the website I am cooperating is an e-commerce web site and they will sell my products.
  2. can any attacker reach my asmx code? I will have some datas inside this code that I dont want sombody to see. (sql server info, web.config info, etc.)
  3. how can I validate which user can use this web service and which user not?

I am new at this web service thing and only source I can find is the below one;


I eagerly await for the responses.

Thsanks Smile

http://machinename:Portno/_vti_bin/lists.asmx throwing error


Hi All 

I am facing with this following error when i access http://machinename:Portno/_vti_bin/lists.asmx. [SharePoint server 2010], all other web services are accessible 


The top XML element 'string' from namespace 'http://schemas.microsoft.com/sharepoint/soap/' references distinct types Microsoft.SharePoint.SoapServer.SoapXml.SoapXmlElement and System.String. Use XML attributes to specify another XML name or namespace for the element or types.


Any help please.




Surface data in external lists in Sharepoint Foundation 2010



I have seen numerous articles for the above, but they all just gloss over the step I am having a problem with, assuming nobody will have an issue with it. 

I'm trying to create an External Content Type so I can use it to display external data (from SQL Server) in an External List.  When I get to the step to add the connection and the SQL Server connection dialog box appears, I enter the server and database names and click OK with the Connect with User's Identity radio button still selected and I get the error message: login failed for user ''. The user is not associated with a trusted SQL Server connection.  I've tried to read up on the different purposes of the radio buttons on offer on this dialog box but don't know which I should really be using and don't think I can create a target application ID anyway in Foundation (for the other two radio button options) as that has to be done in the secure store services.  Can anybody help with this?

lists.asmx webservice an unexpected error occured


I have a sharepoint site and am using the list.asmx webservice to update rows in a list.  My code was working well.  For some reason, after doing a very large batch of updates, the same code now gives this error each time I run it.  The strange thing is that everything worked, I did a large batch then everything broke.  I switched to another site and it worked again.  I did a large batch and everything once again broke.

<Result ID="1,Update" xmlns="http://schemas.microsoft.com/sharepoint/soap/"><ErrorCode>0x80131904</ErrorCode><ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x80131904)</ErrorText>

Importing Data into Sharepoint Lists from External Sql Server


I am looking to import data from  a Relational SQl Server Database that is hosted externally by a 3rd Part vendor. My task is to import all the data that is entered by the external customers into the Sharepoint lists. The external users are presented with a free form Registration page where they enter their data. For the internal users, we want to pull that data in real time and display in lists.

So inother words as soon as the data is entered on the form and user submits it, the database and the sharepoint list should reflect changes simultaneously.

Please give direction as to how can this possible.

Http 404 Not Found on Accessing lists.asmx web service with GetListAndView


Hi All,

I have the following code

    test.site.com.Authentication auth = new test.site.com.Authentication();
    auth.Credentials = new System.Net.NetworkCredential("username", "pwd", "domain");
    tabtest.thealternativeboard.com.Lists b = new tabtest.thealternativeboard.com.Lists();

    b.Url = "http://server1:port/" + subsiteUrl + "/_vti_bin/Lists.asmx";
    b.Credentials = new System.Net.NetworkCredential("username", "pwd", "domain");

      System.Xml.XmlNode ndListView = b.GetListAndView("All Events", ""); <--fails with 404 here-->

      string strListID = ndListView.ChildNodes[0].Attributes["Name"

fx Controls instead of Drop Down Lists for Lookup fields in InfoPath Secondary Data Connections


I have a secondary data connection with a lookup field into another list. To display the fields text value instead of the index, I am using a drop down list which gets its choices from the linked list. This information is read-only so I disabled the control via formatting rule.

A calculated value control might be better suited, but my XPath skills are not very "developed". Has anyone done this before? Taken the index from the bound field and extracted the text value from a second data connection? Thx


Using UpdateListItemsWithKnowledge in Lists.asmx


Hello All,


I wanted to create a small sync application wherein I want to have a functionality that if there is an addition, updation or deletion in one of the SharePoint lists, the same operation should occur into another SharePoint list (either manually or at some schedule)


Any pointers in this direction?




Regards, Paresh http://pareshs.wordpress.com/
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend