SIGN UP MEMBER LOGIN:    
ARTICLE

Programmatically mask the created by and modified by in the SharePoint list edit and display forms

Posted by Vijai Anand Articles | SharePoint April 11, 2011
In this article we will be seeing how to mask the created by and modified by in the SharePoint list edit and display forms
Reader Level:

In this article we will be seeing how to mask the created by and modified by in the SharePoint list edit and display forms as shown in the following

PShare1.gif

Using C#:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using System.Xml;

namespace MaskUser
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite site = new SPSite("http://serverName:1111/"))
            {
                using (SPWeb web = site.RootWeb)
                {                 
                    SPList list=web.Lists["cl"];
                    list.ShowUser = false;            
                    list.Update();
                }
            }
        }
    }
}


Using PowerShell:

$site=Get-SPSite "http://serverName:1111/"
$web=$site.RootWeb
$list=$web.Lists["cl"]
$list.ShowUser=$false
$list.Update()

Login to add your contents and source code to this article
share this article :
post comment
 
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Nevron Gauge for SharePoint
Become a Sponsor