# Thursday, January 28, 2010
        static void Main(string[] args)
        {
            SPSite site = null;
            SPWeb web = null;

            try
            {
                site = new SPSite("http://testSite/SubWeb/Pages/");
                web = site.OpenWeb();
                PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);
                SPContentTypeId contentType = new SPContentTypeId("YourContentTypeId");
                PageLayout[] layouts = publishingWeb.GetAvailablePageLayouts(contentType);
                PageLayout pageLayout = layouts[0];
                string pageName = Guid.NewGuid().ToString() + ".aspx";

                SPUser user = web.EnsureUser("DOMAIN\\USERNAME");
                string createdDate = "2009-11-05T22:35:10Z";
                string modifiedDate = "2009-11-05T22:35:10Z";

                web.AllowUnsafeUpdates = true;
                PublishingPage newPage = publishingWeb.GetPublishingPages().Add(pageName, pageLayout);

                newPage.ListItem["Author"] = user.ID;
                newPage.ListItem["Editor"] = user.ID;
                newPage.ListItem["Created"] = createdDate;
                newPage.ListItem["Modified"] = modifiedDate;
                newPage.ListItem.UpdateOverwriteVersion();

                web.AllowUnsafeUpdates = false;

                Console.WriteLine("OK");
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                Console.ReadLine();
            }
            finally
            {
                web.Dispose();
                site.RootWeb.Dispose();
                site.Dispose();
            }
        }
posted on Thursday, January 28, 2010 12:06:33 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback
# Thursday, January 29, 2009

Windows SharePoint Services is a versatile technology included in Microsoft Windows Server 2003 that enables organizations and businesses of all sizes to increase the efficiency of their processes and improve team productivity.

With tools for collaboration that help people stay connected across organizational and geographic boundaries, Windows SharePoint Services gives people access to the documents and information they need.This quick reference guide provides helpful tips and tricks for using Windows SharePoint Services while highlighting new features in Version 3.0.

You can download this document via this link : http://www.microsoft.com/downloads/details.aspx?familyid=80FD0D64-4BD0-476B-BFD9-39DA34C22EFB&displaylang=en

posted on Thursday, January 29, 2009 8:56:57 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] Trackback