Creating\Updating list items in subsite via Sharepoint webservices

If you ever want to add or update a list item in your subsite using SharePoint's Lists.asmx webservice you would notice that that even after registering the subsite's lists.asmx url you would end up updating the item on the parent site instead.

To solve this issue simply set the webservice url in your code to point to the subsite url(see below)

ListService.Credentials = System.Net.CredentialCache.DefaultCredentials;

ListService.Url = "https://SPParentSite/subsite/_vti_bin/Lists.asmx";

simple isn't it.


Post a Comment


This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at .

Copyright (c) 2010 @ All rights are reserved.Do Not Copy.

@ Learning