Enable to sharepoint User Information List

Sagarp
Posted by Sagarp under SharePoint category on | Points: 40 | Views : 1270
protected void EnableUSIList(object sender, EventArgs e)
{
try
{
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;
List.Update();
Web.AllowUnsafeUpdates = false;
Context.Response.Output.Write(List.Hidden.ToString() + "<br/>");

}
}
catch (Exception ex)
{
Context.Response.Output.Write("Errors: " + ex.Message.ToString());
}

}

Comments or Responses

Login to post response