Archive

Archive for January, 2010

Insert a new record to Sharepoint List

January 22, 2010 Leave a comment

string _strBatch="<Batch OnError="Continue"> "+
                 "<Method ID="1" Cmd="New">"+ 
                 "<Field Name="Title">Abcdef</Field> "+
                 "<Field Name="Project_x0020_code">999050</Field>"+ 
                 "<Field Name="Status">Open</Field>     "+
                 "</Method>"+
                 "</Batch>";
 

Lists listService = new List123.Lists();

CredentialCache.DefaultCredentials;  

XmlDocument xmlDoc = new System.Xml.XmlDocument(); 

XmlElement elBatch = xmlDoc.CreateElement(“Batch”);

elBatch.SetAttribute(

“OnError”, “Continue”);

elBatch.SetAttribute(

“ListVersion”, “1”);

elBatch.InnerXml = _strBatch;

 

XmlNode ndReturn = listService.UpdateListItems(_ListName, elBatch);

Advertisements
Categories: Uncategorized

Sharepoint 2010 Remote Server return No data Exception

January 22, 2010 Leave a comment

When i use Sharepoint and Silverlight, i face the Communication exception.” Remote server returned an error : Not Found “, it will not tell the reason for the exception causes. Few reasons for exception occurs

1)  Check you have permission to access the sharepoint site.

2) Check you SQL database have proper permission to access data

3) Otherwise the value you are passing is not match in sharepoite service, Make sure that you are pass the correct value

Please feel free to place you questions 🙂

Categories: Sharepoint
%d bloggers like this: