Posts

Showing posts from March, 2017

Sharepoint and REST - WebClient - Add Attachment to List Item

Image
Problem Definition Add attachment to SharePoint list item using REST API and WebClient. Prerequisites In order to effectively deal with the data in the SharePoint List I will recommend using Newtonsoft.JSON that makes dealing with List data a lot easier. In order to get JSON plugin go to NuGet and search for JSON.NET or NEWTONSOFT SharePointAndRest_WebClient.cs class dealing with SharePoint Data posting: Code Help /// <summary> /// Implement Sharepoint Functionality using WebClient /// </summary> public class SharePointAndRest_WebClient : IDisposable {         private WebClient webClient;         public Uri WebUri { get; private set; }         public SharePointAndRest_WebClient(Uri webUri)         {                     WebUri = webUri;         }         public st...

Sharepoint and REST - WebClient - Delete Data from List

Image
Problem Definition Delete data from SharePoint list using REST API and WebClient based on Item id.  In this code write up we are deleting Item Id# 2, please check the 'update example' or see snapshot before delete in results section to see details about item# 2. Prerequisites In order to effectively deal with the data in the SharePoint List I will recommend using Newtonsoft.JSON that makes dealing with List data a lot easier. In order to get JSON plugin go to NuGet and search for JSON.NET or NEWTONSOFT SharePointAndRest_WebClient.cs class dealing with SharePoint Data fetch and delete: Code Help  /// <summary>  /// Implement Sharepoint Functionality using WebClient  /// </summary>     public class SharePointAndRest_WebClient : IDisposable     {         private readonly WebClient webClient;         public Uri WebUri { get; private set; }     ...

Indexers

Image
Indexers Definition In simple words Indexers are used for classes to act as arrays i.e. allowing classes to be indexed.  Code Indexers.cs class Indexers<T>  {         private T[] myIndexerArray;         public Indexers(int dataSize)         {             myIndexerArray = new T[dataSize];         }         public int getSize()         {             return myIndexerArray.Count();          }         public T this[int t]         {             get { return myIndexerArray[t]; }             set {  myIndexerArray[t] = value; }         }  } Program.cs  static void Main(string[] args)  { ...

Sharepoint and REST - WebClient - Update Data to List

Image
Problem Definition Update data in SharePoint list using REST API and WebClient based on Item id.  In this code write up we are updating Item Id# 5, please check the 'get example' or see snapshot before update in results section to see details about item# 5. Prerequisites In order to effectively deal with the data in the SharePoint List I will recommend using Newtonsoft.JSON that makes dealing with List data a lot easier. In order to get JSON plugin go to NuGet and search for JSON.NET or NEWTONSOFT SharePointAndRest_WebClient.cs class dealing with SharePoint Data fetch: Code Help /// <summary> /// Implement Sharepoint Functionality using WebClient /// </summary>     public class SharePointAndRest_WebClient : IDisposable     {         private readonly WebClient webClient;         public Uri WebUri { get; private set; }         /// <summary...

Sharepoint and REST - WebClient - Get List Data

Image
Problem Definition Get data from SharePoint list using REST API and WebClient. Prerequisites In order to effectively deal with the data in the SharePoint List I will recommend using Newtonsoft.JSON that makes dealing with List data a lot easier. In order to get JSON plugin go to NuGet and search for JSON.NET or NEWTONSOFT SharePointAndRest_WebClient.cs class dealing with SharePoint Data fetch: Code Help /// <summary> /// Implement Sharepoint Functionality using WebClient /// </summary> public class SharePointAndRest_WebClient : IDisposable {         private readonly WebClient webClient;         public Uri WebUri { get; private set; }         /// <summary>         /// Intialize webclient and set it up for use with sharepoint using Default Credentials         /// </summary>         /// <param name="webU...

Sharepoint and REST - WebClient - Insert Data to list

Image
Problem Definition Add attachment to SharePoint list item using REST API and WebClient. Prerequisites In order to effectively deal with the data in the SharePoint List I will recommend using Newtonsoft.JSON that makes dealing with List data a lot easier. In order to get JSON plugin go to NuGet and search for JSON.NET or NEWTONSOFT SharePointAndRest_WebClient.cs class dealing with SharePoint Data posting: Code Help /// <summary>     /// Implement Sharepoint Functionality using WebClient     /// </summary>     public class SharePointAndRest_WebClient : IDisposable     {         private readonly WebClient webClient;         public Uri WebUri { get; private set; }         /// <summary>         /// Intialize webclient and set it up for use with sharepoint using Default Credentials         ///...