Accessing Personal View in Sharepoint List
Posted on 2011-02-15
I am farm admin in a SharePoint farm in my company . I want to know how many users having personal view in a SharePoint list? And users identity?
I want to do it programmatically. Any Idea how to achieve this?
Any help appreciated
I tried with following code but only giving me my personal view, not all personal views from all users.
string site = Convert.ToString(txtsiteUrl.Text);
string list = Convert.ToString(txtListName.Text);
SPSite spsite = new SPSite(site);
SPWeb spweb = spsite.OpenWeb();
SPList splist = spweb.Lists[list];
SPViewCollection views = splist.Views;
foreach (SPView view in views)
Response.Write(view.Title + "</br>");
Response.Write(view.Views.Count + "</br>");