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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Saravana Kumar S
NA
37
13.4k
How to check particular List is Exists or not in SharePoint 2010 ?
Oct 25 2012 9:28 AM
How to check particular List is Exists or not in SharePoint 2010 ?
TryGetList
method in SharePoint 2010
below is sample code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Microsoft.SharePoint;
namespace MultiChoice
{
class Program
{
static void Main(string[] args)
{
using (SPSite site = new SPSite("http://serverName/sites/Vijai/"))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists.TryGetList("Test");
if (list != null)
{
List is Exists
}
else
{
List Is not Exists
}
}
}
}
}
}
Reply
Answers (
2
)
How many way to create sharepoint list(Both OOB and visual studio)