moss隐藏字段

       SPSite site = null;
            SPWeb web = null;

            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                site = new SPSite(@"http://sharepoint/");
                web = site.OpenWeb();
            });
            SPList list=web.Lists["工作追踪"];
            SPField field = list.Fields["当前进度"];
            field.ShowInEditForm = false;
            field.ShowInNewForm = false;
            field.ShowInDisplayForm = false;
            field.Update();
            Console.WriteLine("it  is   ok...");

你可能感兴趣的:(OS)