skip to main
|
skip to sidebar
Simon Ovens, a Microsoft Developer's Journey.
Thursday, June 25, 2009
Check if SPList or SPView exists
One thing that the SharePoint team left out is a built-in way to see if a SPList or SPView exists.
So if you have the
Dynamic library
from ScottGu's Blog then you can setup an extension method or helper method with the following linq:
SPList
spweb.Lists.Cast
().Any(list => string.Equals(list.Title, listName));
SPView
splist.Views.Cast
().Any(view => string.Equals(view.Title, viewName));
both return a boolean
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
▼
2009
(9)
►
September
(1)
►
July
(1)
▼
June
(3)
Check if SPList or SPView exists
MOSS Search crawler not populating out of the box ...
PortalSiteMapProvider randomly drops off pages
►
May
(3)
►
April
(1)
No comments:
Post a Comment