.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Code Snippets >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Enable to sharepoint User Information List

Posted By:Sagar Pardeshi       Posted Date: September 14, 2013    Points: 40    Category: SharePoint    URL: http://www.dotnetspark.com  

In sharepoint User Information List by default hidden for using following code we enable to show this list

protected void EnableUSIList(object sender, EventArgs e)
                string strFields = "";
                //Context.Response.Output.Write("Clicked Me!");
                SPSite Site = SPContext.Current.Site;
                Context.Response.Output.Write(Site + "<br/>");
                using (SPWeb Web = Site.OpenWeb())
                	Web.AllowUnsafeUpdates = true;
                    SPList List = Web.Lists["User Information List"];
                    Context.Response.Output.Write(List.ToString() + "<br/>");
                    List.Hidden = false;
                    Web.AllowUnsafeUpdates = false;
                    Context.Response.Output.Write(List.Hidden.ToString() + "<br/>");
            catch (Exception ex)
                Context.Response.Output.Write("Errors: " + ex.Message.ToString());


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend