TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Retrieve the Available Lists from the Current site
Sagar Pardeshi
Oct 02
2014
Code
925
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
this
.Cursor = Cursors.WaitCursor;
ListsListBox.Items.Clear();
//Get a context
using (ClientOM.ClientContext ctx =
new
ClientOM.ClientContext(UrlTextBox.Text))
{
//Get the site
ClientOM.Web site = ctx.Web;
ctx.Load(site);
//Get Lists
ctx.Load(site.Lists);
//Query
ctx.ExecuteQuery();
//Fill List
foreach (ClientOM.List list
in
site.Lists)
{
ListsListBox.Items.Add(list.Title);
}
//Return the cursor to normal
this
.Cursor = Cursors.Default;
}
Jquery
retrieve lists in jquery