Thursday, August 25, 2011

Client Object Model In SharePoint 2010



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ClientOM = Microsoft.SharePoint.Client;

namespace SharePointList
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void ShowButton_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            ListsListBox.Items.Clear();
            using(ClientOM.ClientContext ctx=new ClientOM.ClientContext(UrlTextBox.Text))
            {
                ClientOM.Web site=ctx.Web;
                ctx.Load(site);
                ctx.Load(site.Lists);
                ctx.ExecuteQuery();
                foreach (ClientOM.List list in site.Lists)
                {
                    ListsListBox.Items.Add(list.Title);
                    this.Cursor = Cursors.Default;
                }
            }
        }
    }
}

3 comments:


  1. Günümüzde en çok tercih edilen aktivitelerden biri boş zamanları oyunlar oynayarak değerlendirmektir. Bu alanda çeşitli platformlar aracılığıyla yeni oyunlara ulaşmak oldukça kolay hale geldi. Eğer siz de en güncel ve çeşitli oyunları keşfetmek istiyorsanız, oyun indir sitesini ziyaret edebilirsiniz. Böylece sevdiğiniz tarzda birçok oyunu tek platformda bulabilir ve hemen oynamaya başlayabilirsiniz.

    ReplyDelete

Featured Post

How to Check User Membership & Ownership Across All Exchange Online Group Types Using PowerShell

How to Check User Membership & Ownership Across All Exchange Online Group Types Using PowerShell Introduction As an M365 administrato...

Popular posts